diff --git a/smoke-test/spring-boot-smoke-test-restclient/src/test/java/smoketest/restclient/SampleRestClientApplicationGh49223Tests.java b/smoke-test/spring-boot-smoke-test-restclient/src/test/java/smoketest/restclient/SampleRestClientApplicationGh49223Tests.java index 16c648244a8..451af24955a 100644 --- a/smoke-test/spring-boot-smoke-test-restclient/src/test/java/smoketest/restclient/SampleRestClientApplicationGh49223Tests.java +++ b/smoke-test/spring-boot-smoke-test-restclient/src/test/java/smoketest/restclient/SampleRestClientApplicationGh49223Tests.java @@ -17,7 +17,6 @@ package smoketest.restclient; import java.util.List; -import java.util.Objects; import org.junit.jupiter.api.Test; import tools.jackson.databind.DeserializationFeature; @@ -39,8 +38,8 @@ class SampleRestClientApplicationGh49223Tests { @Test void applicationStarts() { RestClient restClient = this.restClientBuilder.build(); - List messageConverters = (List) Objects - .requireNonNull(ReflectionTestUtils.getField(restClient, "messageConverters")); + List messageConverters = (List) ReflectionTestUtils.getField(restClient, "messageConverters"); + assertThat(messageConverters).isNotNull(); JacksonJsonHttpMessageConverter jacksonConverter = (JacksonJsonHttpMessageConverter) messageConverters.stream() .filter((converter) -> converter instanceof JacksonJsonHttpMessageConverter) .findFirst()