assertEquals(1, connector.getSessions().size()); assertEquals(session, connector.getSessions().get(0));
assertEquals(1, connector.getManagedSessions().size()); assertEquals(session, connector.getManagedSessions().get(0));
    public void testConnector() throws Exception {        SessionID sessionID = new SessionID(FixVersions.BEGINSTRING_FIX40, "TW", "ISLD");        SessionSettings settings = setUpSessionSettings(sessionID);        DefaultSessionFactory sessionFactory = new DefaultSessionFactory(new UnitTestApplication(),                new MemoryStoreFactory(), new ScreenLogFactory(true, true, true));                SessionConnector connector = new SessionConnectorUnderTest(settings, sessionFactory);                Session session = connector.createSession(sessionID);        assertNotNull(session);                Map sessions = Collections.singletonMap(session.getSessionID(), session);        connector.setSessions(sessions);        assertEquals(1, connector.getSessions().size());        assertEquals(session, connector.getSessions().get(0));                assertFalse(connector.isLoggedOn());                session.getState().setLogonSent(true);        session.getState().setLogonReceived(true);        assertTrue(connector.isLoggedOn());                assertTrue(session.isEnabled());        connector.logoutAllSessions(true);        assertFalse(session.isEnabled());                assertEquals(9999, connector.getIntSetting(Acceptor.SETTING_SOCKET_ACCEPT_PORT));                assertNotNull(connector.getScheduledExecutorService());        assertEquals(settings, connector.getSettings());    }