@Test
  public void testNoServers() throws Exception {
    startFakeLocator();
    handler.nextConnectionResponse = new ClientConnectionResponse(null);
    assertThatThrownBy(() -> source.findServer(null))
        .isInstanceOf(NoAvailableServersException.class);
  }
This test validates the AutoConnectionSourceImpl.addBadLocators method. That method adds
badLocator from badLocator list to new Locator list. And it make sure that new locator list
doesn't have similar entry. For that it checks hostname and port only.
geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplIntegrationTest.java