diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java index bcd7e7e973..dd60cd53f2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java @@ -192,7 +192,7 @@ class OAuth2ResourceServerAutoConfigurationTests { assertThat(context.containsBean("jwtDecoderByIssuerUri")).isTrue(); SupplierJwtDecoder supplierJwtDecoderBean = context.getBean(SupplierJwtDecoder.class); Supplier jwtDecoderSupplier = (Supplier) ReflectionTestUtils - .getField(supplierJwtDecoderBean, "jwtDecoderSupplier"); + .getField(supplierJwtDecoderBean, "delegate"); jwtDecoderSupplier.get(); }); // The last request is to the JWK Set endpoint to look up the algorithm @@ -216,7 +216,7 @@ class OAuth2ResourceServerAutoConfigurationTests { assertThat(context.containsBean("jwtDecoderByIssuerUri")).isTrue(); SupplierJwtDecoder supplierJwtDecoderBean = context.getBean(SupplierJwtDecoder.class); Supplier jwtDecoderSupplier = (Supplier) ReflectionTestUtils - .getField(supplierJwtDecoderBean, "jwtDecoderSupplier"); + .getField(supplierJwtDecoderBean, "delegate"); jwtDecoderSupplier.get(); }); // The last request is to the JWK Set endpoint to look up the algorithm @@ -241,7 +241,7 @@ class OAuth2ResourceServerAutoConfigurationTests { assertThat(context.containsBean("jwtDecoderByIssuerUri")).isTrue(); SupplierJwtDecoder supplierJwtDecoderBean = context.getBean(SupplierJwtDecoder.class); Supplier jwtDecoderSupplier = (Supplier) ReflectionTestUtils - .getField(supplierJwtDecoderBean, "jwtDecoderSupplier"); + .getField(supplierJwtDecoderBean, "delegate"); jwtDecoderSupplier.get(); }); // The last request is to the JWK Set endpoint to look up the algorithm @@ -516,7 +516,7 @@ class OAuth2ResourceServerAutoConfigurationTests { .run((context) -> { SupplierJwtDecoder supplierJwtDecoderBean = context.getBean(SupplierJwtDecoder.class); Supplier jwtDecoderSupplier = (Supplier) ReflectionTestUtils - .getField(supplierJwtDecoderBean, "jwtDecoderSupplier"); + .getField(supplierJwtDecoderBean, "delegate"); JwtDecoder jwtDecoder = jwtDecoderSupplier.get(); validate(issuerUri, jwtDecoder); });