{
ClientSessionFactoryImpl sf = (ClientSessionFactoryImpl) locator.createSessionFactory();
ClientSession session1 = sf.createSession(false, true, true);
ClientSession session2 = sf.createSession(false, true, true);
ClientSession session3 = sf.createSession(false, true, true);
Assert.assertEquals(1, server.getRemotingService().getConnections().size());
WeakReference<ClientSession> ref1 = new WeakReference<ClientSession>(session1);
WeakReference<ClientSession> ref2 = new WeakReference<ClientSession>(session2);