assertEquals("wrong # of session", 1, initiator.getSessions().size());
assertEquals("wrong # of session", 1, initiator.getManagedSessions().size());
    public void testBlockLogoffAfterLogon() throws Exception {        ServerThread serverThread = new ServerThread();        try {            serverThread.start();            serverThread.waitForInitialization();            SessionID clientSessionID = new SessionID(FixVersions.BEGINSTRING_FIX42, "TW", "ISLD");            SessionSettings settings = getClientSessionSettings(clientSessionID);            ClientApplication clientApplication = new ClientApplication();            final SocketInitiator initiator = new SocketInitiator(clientApplication,                    new MemoryStoreFactory(), settings, new DefaultMessageFactory());            clientApplication.stopAfterLogon(initiator);            clientApplication.setUpLogonExpectation();            initiator.block();            System.out.println("@@@@ block returned");            assertFalse("wrong logon status", initiator.isLoggedOn());            assertEquals("wrong # of session", 1, initiator.getSessions().size());        } finally {            serverThread.interrupt();        }    }