    @Test
    public void loginRejected() throws Exception {

        loginRejected.rejectReasonCode = SoupBinTCP.LOGIN_REJECT_CODE_NOT_AUTHORIZED;

        server.reject(loginRejected);

        while (clientStatus.collect().size() != 1)
            client.receive();

        assertEquals(asList(new LoginRejected(SoupBinTCP.LOGIN_REJECT_CODE_NOT_AUTHORIZED)),
                clientStatus.collect());
    }