diff --git a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignClientsRegistrarTests.java b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignClientsRegistrarTests.java index fc310985..a1a7900f 100644 --- a/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignClientsRegistrarTests.java +++ b/spring-cloud-openfeign-core/src/test/java/org/springframework/cloud/openfeign/FeignClientsRegistrarTests.java @@ -18,7 +18,6 @@ package org.springframework.cloud.openfeign; import java.util.Collections; -import feign.Target; import org.junit.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -26,7 +25,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.mock.env.MockEnvironment; -import org.springframework.test.util.ReflectionTestUtils; import org.springframework.web.bind.annotation.GetMapping; import static org.assertj.core.api.Assertions.assertThat; @@ -106,21 +104,6 @@ public class FeignClientsRegistrarTests { .doesNotThrowAnyException(); } - @Test - public void shouldResolveNullUrl() { - AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); - context.register(NullUrlFeignClientTestConfig.class); - context.refresh(); - - Object feignClientBean = context.getBean(NullUrlFeignClient.class); - - Object invocationHandlerLambda = ReflectionTestUtils.getField(feignClientBean, "h"); - Target.HardCodedTarget target = (Target.HardCodedTarget) ReflectionTestUtils - .getField(invocationHandlerLambda, "arg$4"); - assertThat(target.name()).isEqualTo("nullUrlFeignClient"); - assertThat(target.url()).isEqualTo("http://nullUrlFeignClient"); - } - @Test public void shouldResolveAndValidateNullName() { assertThatIllegalStateException().isThrownBy(() -> {