@Test
public void messageReceivedNotActivated() throws Exception {

    IoSession other = mock(IoSession.class);
    
    when(session.getAttribute(Socks5AcceptorHandler.STATE_KEY)).thenReturn(ProxyState.CONNECTED);
    Socks5Pair pair = new Socks5Pair(session, connectionsRegistry, "foo");
    pair.setRequester(other);
    when(session.getAttribute(Socks5AcceptorHandler.PAIR_KEY)).thenReturn(pair);
    
    IoBuffer buffer = IoBuffer.wrap(new byte[]{0x6C, 0x6F, 0x63});
    
    handler.messageReceived(session, buffer);
    
    verify(session).close(false);
    verify(other).close(false);
}