@Test
void shouldInitializeChannel()
{

    ChannelPromise promise = channel.newPromise();
    protocol.initializeChannel( "MyDriver/0.0.1", dummyAuthToken(), RoutingContext.EMPTY, promise );
    assertThat( channel.outboundMessages(), hasSize( 1 ) );
    assertThat( channel.outboundMessages().poll(), instanceOf( HelloMessage.class ) );
    assertEquals( 1, messageDispatcher.queuedHandlersCount() );
    assertFalse( promise.isDone() );
    Map<String,Value> metadata = new HashMap<>();
    metadata.put( "server", value( anyServerVersion().toString() ) );
    metadata.put( "connection_id", value( "bolt-42" ) );
    messageDispatcher.handleSuccessMessage( metadata );
    assertTrue( promise.isDone() );
    assertTrue( promise.isSuccess() );
}