Collection<GerritEventListener> savedEventListeners =
Whitebox.getInternalState(handler, "gerritEventListeners");
// DependencyQueueTaskDispatcher adds 1 listener
// ReplicationQueueTaskDispatcher adds 1 listener
assertEquals(3, savedEventListeners.size());
Config config = (Config)server.getConfig();
config.setGerritAuthKeyFile(keyFile.getPublicKey());
config.setGerritHostName("localhost");
config.setGerritFrontEndURL("http://localhost");
config.setGerritSshPort(29418);
config.setGerritProxy("");
server.startConnection();
handler = Whitebox.getInternalState(server, GerritHandler.class);
Collection<GerritEventListener> gerritEventListeners =
Whitebox.getInternalState(handler, "gerritEventListeners");