@Override
    List<DiscoveryNode> resolveNodes() {
        if (serviceName != null && !serviceName.isEmpty()) {
            logger.fine("Using service name to discover nodes.");
            return getSimpleDiscoveryNodes(client.endpointsByName(serviceName));
        } else if (serviceLabel != null && !serviceLabel.isEmpty()) {
            logger.fine("Using service label to discover nodes.");
            return getSimpleDiscoveryNodes(client.endpointsByServiceLabel(serviceLabel, serviceLabelValue));
        } else if (podLabel != null && !podLabel.isEmpty()) {
            logger.fine("Using pod label to discover nodes.");
            return getSimpleDiscoveryNodes(client.endpointsByPodLabel(podLabel, podLabelValue));
        }
        return getSimpleDiscoveryNodes(client.endpoints());
    }
@Test
    public void resolveWhenNodeInFound() {
        // given
        List<Endpoint> endpoints = Collections.emptyList();
        given(client.endpoints()).willReturn(endpoints);

        KubernetesApiEndpointResolver sut = new KubernetesApiEndpointResolver(LOGGER, null, 0, null, null, null, null, null, client);

        // when
        List<DiscoveryNode> nodes = sut.resolveNodes();

        // then
        assertEquals(0, nodes.size());
    }