### Question:
ZergConnectorImpl implements ZergConnector { @Override public ImmutableSet<ZergHost> getHosts() throws BackingStoreException { ImmutableSet.Builder<ZergHost> hosts = ImmutableSet.builder(); for (Map.Entry<String, Map<String, ZergHost>> regionEntry : getRegions().entrySet()) { Map<String, ZergHost> region = regionEntry.getValue(); for (Map.Entry<String, ZergHost> hostEntry : region.entrySet()) { ZergHost host = hostEntry.getValue(); host.setName(hostEntry.getKey()); hosts.add(host); } } return hosts.build(); } @Inject  ZergConnectorImpl(@Named(ZergDaoModule.ZERG_MANIFEST_URL_PROPERTY) String manifestUrl,
      CacheBuilder<Object, Object> regionsCache, ZergConnectorImpl.ZergLoader loader); @Override ImmutableSet<ZergHost> getHosts();  }### Answer:
@Test public void getHosts() throws Exception { expectZergResponseBody(MANIFEST); replayAll(); assertEquals(HOSTS, connector.getHosts()); }
@Test public void getHosts_emptyManifest() throws Exception { expectZergResponseBody(EMPTY_MANIFEST); replayAll(); assertEquals(ImmutableSet.of(), connector.getHosts()); }
@Test(expected = BackingStoreException.class) public void getHosts_badManifest() throws Exception { expectZergResponseBody(BAD_MANIFEST); replayAll(); connector.getHosts(); }
@Test(expected = BackingStoreException.class) public void getHosts_timeout() throws Exception { expectBackingStoreException(new ExecutionException(new TimeoutException())); replayAll(); connector.getHosts(); }
@Ignore @Test(expected = BackingStoreException.class) public void getHosts_interrupted() throws Exception { expectBackingStoreException(new InterruptedException()); replayAll(); connector.getHosts(); }
@Test(expected = BackingStoreException.class) public void getHosts_ioException() throws Exception { expectZergResponseException(new IOException()); replayAll(); connector.getHosts(); }