master.peerBean().peerMap().peerFound(slave2.peerAddress(), null, null);
System.err.println("both peers online");
PeerAddress slaveAddress1 = slave1.peerAddress();
slave1.shutdown().await();
master.peerBean().peerMap().peerFailed(slaveAddress1, new PeerException(AbortCause.SHUTDOWN, "shutdown"));
Assert.assertEquals(1, test1.get());
Assert.assertEquals(2, test2.get());
PeerAddress slaveAddress2 = slave2.peerAddress();
slave2.shutdown().await();
master.peerBean().peerMap().peerFailed(slaveAddress2, new PeerException(AbortCause.SHUTDOWN, "shutdown"));
Assert.assertEquals(1, test1.get());
Assert.assertEquals(3, test2.get());
} finally {