@SuppressWarnings("OptionalGetWithoutIsPresent")
	@Test
	void shouldCreateRestTemplateDiscoveryClientOptionalArgsWhenJerseyClientDisabled() {
		new ApplicationContextRunner()
			.withConfiguration(AutoConfigurations.of(DiscoveryClientOptionalArgsConfiguration.class))
			.withPropertyValues("eureka.client.jersey.enabled=false")
			.run(context -> {
				assertThat(context).hasSingleBean(AbstractDiscoveryClientOptionalArgs.class);
				assertThat(context.getBeansOfType(AbstractDiscoveryClientOptionalArgs.class)
					.values()
					.stream()
					.findFirst()
					.get()).isInstanceOf(RestTemplateDiscoveryClientOptionalArgs.class);
				assertThat(context).hasSingleBean(RestTemplateDiscoveryClientOptionalArgs.class);
			});
	}
Tests for Jersey client setup in DiscoveryClientOptionalArgsConfiguration.

@author Olga Maciaszek-Sharma
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/config/JerseyClientOptionalArgsConfigurationTests.java