@Test
public void getEndPointsListTest() {

	Map<String, String> labels = new HashMap();
	labels.put("l", "v");
	Endpoints endPoint = new EndpointsBuilder().withNewMetadata().withName("endpoint").withNamespace("test")
			.withLabels(labels).endMetadata().addNewSubset().addNewAddress().withIp("ip1").withNewTargetRef()
			.withUid("30").endTargetRef().endAddress().addNewPort("http", "http_tcp", 80, "TCP").endSubset()
			.build();
	List<Endpoints> endpointsList = new ArrayList<>();
	endpointsList.add(endPoint);
	EndpointsList endpoints = new EndpointsList();
	endpoints.setItems(endpointsList);
	mockServer.expect().get()
			.withPath(
					"/api/v1/namespaces/test/endpoints?labelSelector=l%3Dv&fieldSelector=metadata.name%3Dendpoint")
			.andReturn(200, endpoints).once();
	final KubernetesDiscoveryProperties properties = new KubernetesDiscoveryProperties();
	properties.setServiceLabels(labels);
	final KubernetesDiscoveryClient discoveryClient = new KubernetesDiscoveryClient(mockClient, properties,
			KubernetesClient::services, new DefaultIsServicePortSecureResolver(properties));
	final List<Endpoints> result_endpoints = discoveryClient.getEndPointsList("endpoint");
	assertThat(result_endpoints).hasSize(1);
}