@Test
void shouldFailToInitializeChannelWhenErrorIsReceived()
{

    ChannelPromise promise = channel.newPromise();
    protocol.initializeChannel( "MyDriver/2.2.1", dummyAuthToken(), RoutingContext.EMPTY, promise );
    assertThat( channel.outboundMessages(), hasSize( 1 ) );
    assertThat( channel.outboundMessages().poll(), instanceOf( HelloMessage.class ) );
    assertEquals( 1, messageDispatcher.queuedHandlersCount() );
    assertFalse( promise.isDone() );
    messageDispatcher.handleFailureMessage( "Neo.TransientError.General.DatabaseUnavailable", "Error!" );
    assertTrue( promise.isDone() );
    assertFalse( promise.isSuccess() );
}