@Override
	public <T> T target(FeignClientFactoryBean factory, Feign.Builder feign, FeignClientFactory context,
			Target.HardCodedTarget<T> target) {
		if (!(feign instanceof PolarisFeignCircuitBreaker.Builder)) {
			return feign.target(target);
		}
		PolarisFeignCircuitBreaker.Builder builder = (PolarisFeignCircuitBreaker.Builder) feign;
		String name = !StringUtils.hasText(factory.getContextId()) ? factory.getName() : factory.getContextId();
		Class<?> fallback = factory.getFallback();
		if (fallback != void.class) {
			return targetWithFallback(name, context, target, builder, fallback);
		}
		Class<?> fallbackFactory = factory.getFallbackFactory();
		if (fallbackFactory != void.class) {
			return targetWithFallbackFactory(name, context, target, builder, fallbackFactory);
		}
		return builder(name, builder).target(target);
	}
@Test
	public void testTarget2() {
		PolarisFeignCircuitBreakerTargeter targeter = new PolarisFeignCircuitBreakerTargeter(circuitBreakerFactory, circuitBreakerNameResolver);
		FeignClientFactoryBean feignClientFactoryBean = mock(FeignClientFactoryBean.class);
		doReturn(TestApi.class).when(feignClientFactoryBean).getFallback();
		doReturn("test").when(feignClientFactoryBean).getName();
		FeignClientFactory feignClientFactory = mock(FeignClientFactory.class);
		doReturn(null).when(feignClientFactory).getInstance("test", TestApi.class);
		assertThatThrownBy(() -> {
			targeter.target(feignClientFactoryBean, new PolarisFeignCircuitBreaker.Builder(), feignClientFactory, new Target.HardCodedTarget<>(TestApi.class, "/test"));
		}).isInstanceOf(IllegalStateException.class);
	}