selector.start();
Assert.assertTrue(timing.awaitLatch(debugLeadershipLatch));
server.stop();
Assert.assertTrue(timing.awaitLatch(lostLatch));
timing.sleepABit();
debugLeadershipWaitLatch.countDown();
server = new TestingServer(server.getPort(), server.getTempDirectory());
Assert.assertTrue(timing.awaitLatch(reconnectedLatch));