@Test
void shouldPrepareToCloseChannel()
{

    protocol.prepareToCloseChannel( channel );
    assertThat( channel.outboundMessages(), hasSize( 1 ) );
    assertThat( channel.outboundMessages().poll(), instanceOf( GoodbyeMessage.class ) );
    assertEquals( 1, messageDispatcher.queuedHandlersCount() );
}