assertTrue(cm.containsRemotingSession("sessionid3"));
assertTrue(cm.containsRemotingSession("sessionid4"));
assertTrue(cm.containsRemotingSession("sessionid5"));
assertTrue(cm.containsRemotingSession("sessionid6"));
ConnectionEndpoint r1 = cm.unregisterConnection("jvm3", "sessionid6");
assertEquals(e6, r1);
assertFalse(e6.isClosed());
assertNull(cm.unregisterConnection("blah", "blah"));
assertFalse(cm.containsRemotingSession("sessionid6"));
ConnectionEndpoint r2 = cm.unregisterConnection("jvm3", "sessionid5");
assertEquals(e5, r2);
assertFalse(e5.isClosed());
assertFalse(cm.containsRemotingSession("sessionid5"));
cm.handleClientFailure("sessionid4");
assertNull(cm.unregisterConnection("jvm2", "sessionid4"));
ConnectionEndpoint r3 = cm.unregisterConnection("jvm2", "sessionid3");
assertEquals(e3, r3);
assertFalse(e3.isClosed());
assertFalse(cm.containsRemotingSession("sessionid4"));
assertFalse(cm.containsRemotingSession("sessionid3"));
assertTrue(e4.isClosed());
ConnectionEndpoint r4 = cm.unregisterConnection("jvm1", "sessionid1");
assertEquals(e1, r4);
assertFalse(e1.isClosed());
ConnectionEndpoint r5 = cm.unregisterConnection("jvm1", "sessionid2");
assertEquals(e2, r5);
assertFalse(e2.isClosed());
assertFalse(cm.containsRemotingSession("sessionid2"));
assertFalse(cm.containsRemotingSession("sessionid1"));