@Test
public void testMessageBeforeLogonWithKnownButUnboundSession() throws Exception {

    IoSession mockIoSession = mock(IoSession.class);
    stub(mockIoSession.getAttribute("QF_SESSION")).toReturn(null);
    EventHandlingStrategy mockEventHandlingStrategy = mock(EventHandlingStrategy.class);
    try (Session qfSession = SessionFactoryTestSupport.createSession()) {
        Logout logout = new Logout();
        logout.getHeader()
                .setString(SenderCompID.FIELD, qfSession.getSessionID().getSenderCompID());
        logout.getHeader()
                .setString(TargetCompID.FIELD, qfSession.getSessionID().getTargetCompID());
        // Expect that onMessage will not be called
        //mockEventHandlingStrategy.onMessage(qfSession, logout);
        HashMap<SessionID, Session> acceptorSessions = new HashMap<>();
        acceptorSessions.put(qfSession.getSessionID(), qfSession);
        AcceptorIoHandler handler = new AcceptorIoHandler(createSessionProvider(acceptorSessions),
                new NetworkingOptions(new Properties()), mockEventHandlingStrategy);
        handler.processMessage(mockIoSession, logout);
        verify(mockIoSession).getAttribute("QF_SESSION");
        verifyNoMoreInteractions(mockEventHandlingStrategy);
    }
}