public Collection<String> getCandidateEIPs(String myInstanceId, String myZone) {

        if (myZone == null) {
            myZone = "us-east-1d";
        }

        Collection<String> eipCandidates = clientConfig.shouldUseDnsForFetchingServiceUrls()
                        ? getEIPsForZoneFromDNS(myZone)
                        : getEIPsForZoneFromConfig(myZone);

        if (eipCandidates == null || eipCandidates.size() == 0) {
            throw new RuntimeException("Could not get any elastic ips from the EIP pool for zone :" + myZone);
        }

        return eipCandidates;
    }
@Test(expected = RuntimeException.class)
    public void shouldThrowExceptionWhenNoElasticNames() {
        when(config.getRegion()).thenReturn("eu-west-1");
        List<String> hosts = Lists.newArrayList("example.com", "5.6.7.8");
        when(config.getEurekaServerServiceUrls(any(String.class))).thenReturn(hosts);

        eipManager.getCandidateEIPs("i-123", "eu-west-1a");
    }