@Test
public void testAgentReconnect() {
// After connecting agent daemon,
AgentDaemon agent = new AgentDaemon(agentConfig1);
agent.run(console1.getConsolePort());
agent.addListener(new AgentShutDownSynchronizeListener(condition));
// Shutdown console
sleep(3000);
assertThat(console1.getAllAttachedAgentsCount(), is(1));
// shutdown twice