@Test    
public void testDynamicSessionIsAddedToSessionConnector() throws Exception {

    MySessionConnector connector = new MySessionConnector(settings, null);
    SessionID id1 = new SessionID("FIX.4.2", "me", "SENDERSUB",
            "SENDERLOC", "you", "TARGETSUB", "TARGETLOC", null);
    Session session = provider.getSession(id1, connector);
    assertEquals(1, connector.sessions.size());
    // try again with same sesionID - should still be 1
    session = provider.getSession(id1, connector);
    assertEquals(1, connector.sessions.size());
    session.close();
    SessionID id2 = new SessionID("FIX.4.2", "SENDER2", "SENDERSUB",
            "SENDERLOC", "TARGET2", "TARGETSUB", "TARGETLOC", null);
    Session session2 = provider.getSession(id2, connector);
    assertEquals(2, connector.sessions.size());
    session2.close();
}