List<Endpoint> endpoints() {
        try {
            String urlString = String.format("%s/api/v1/namespaces/%s/pods", kubernetesMaster, namespace);
            return enrichWithPublicAddresses(parsePodsList(callGet(urlString)));
        } catch (RestClientException e) {
            return handleKnownException(e);
        }
    }
@Test
    public void advancedNetworkExternalIpServicePerPod() throws JsonProcessingException {
        // given
        String servicePerPodLabel = "hazelcast.com/service-per-pod";
        String servicePerPodLabelValue = "true";
        cleanUpClient();
        kubernetesClient = newKubernetesClient(false, servicePerPodLabel, servicePerPodLabelValue);

        String serviceName = "service-name";
        List<String> podsIps = Arrays.asList("192.168.0.25", "172.17.0.5");
        stub(String.format("/api/v1/namespaces/%s/endpoints/%s", NAMESPACE, serviceName), endpoints(podsIps, Arrays.asList(5701
                , 5701)));

        stub(String.format("/api/v1/namespaces/%s/pods", NAMESPACE), podsListMultiplePorts(podsIps));
        Map<String, String> queryParams = singletonMap("labelSelector", String.format("%s=%s", servicePerPodLabel, servicePerPodLabelValue));
        stub(String.format("/api/v1/namespaces/%s/endpoints", NAMESPACE), queryParams, endpointsListResponse());

        stub(String.format("/api/v1/namespaces/%s/services/hazelcast-0", NAMESPACE), service(servicePort(32123, 5701, 31916)));
        stub(String.format("/api/v1/namespaces/%s/services/service-1", NAMESPACE), service(servicePort(32124, 5701, 31917)));
        stub("/api/v1/nodes/node-name-1", node("node-name-1", "10.240.0.21", "35.232.226.200"));
        stub("/api/v1/nodes/node-name-2", node("node-name-2", "10.240.0.22", "35.232.226.201"));
        stub(String.format("/api/v1/namespaces/%s/pods/hazelcast-0", NAMESPACE),
                pod("hazelcast-0", NAMESPACE, "node-name-1", 5701));
        stub(String.format("/api/v1/namespaces/%s/pods/hazelcast-1", NAMESPACE),
                pod("hazelcast-1", NAMESPACE, "node-name-2", 5701));

        // when
        List<Endpoint> result = kubernetesClient.endpoints();

        // then
        assertThat(formatPrivate(result)).containsExactlyInAnyOrder(ready("192.168.0.25", 5701), ready("172.17.0.5", 5701));
        assertThat(formatPublic(result)).containsExactlyInAnyOrder(ready("35.232.226.200", 31916), ready("35.232.226.201", 31917));
    }