@Test
public void sessionClosed() throws Exception {

    IoSession other = mock(IoSession.class);
    
    Socks5Pair pair = new Socks5Pair(session, connectionsRegistry, "foo");
    pair.setRequester(other);
    when(session.getAttribute(Socks5AcceptorHandler.PAIR_KEY)).thenReturn(pair);
    
    handler.sessionClosed(session);
    
    verify(session).close(false);
    verify(other).close(false);
}