private void startFakeLocator() throws IOException, InterruptedException {
    server = new TcpServer(port, InetAddress.getLocalHost(), handler,
        "Tcp Server", new ProtocolCheckerImpl(),
        DistributionStats::getStatTime,
        Executors::newCachedThreadPool,
        SocketCreatorFactory
            .getSocketCreatorForComponent(SecurableCommunicationChannel.LOCATOR),
        InternalDataSerializer.getDSFIDSerializer().getObjectSerializer(),
        InternalDataSerializer.getDSFIDSerializer().getObjectDeserializer(),
        GeodeGlossary.GEMFIRE_PREFIX + "TcpServer.READ_TIMEOUT",
        GeodeGlossary.GEMFIRE_PREFIX + "TcpServer.BACKLOG");
    server.start();
    Thread.sleep(500);
  }
This tests that discovery works even after one of two locators was shut down
geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplIntegrationTest.java