@Test
void shouldEncodeInitMessage() throws Exception
{

    Map<String,Value> authToken = new HashMap<>();
    authToken.put( "username", value( "bob" ) );
    authToken.put( "password", value( "secret" ) );
    encoder.encode( new InitMessage( "MyDriver", authToken ), packer );
    InOrder order = inOrder( packer );
    order.verify( packer ).packStructHeader( 2, InitMessage.SIGNATURE );
    order.verify( packer ).pack( "MyDriver" );
    order.verify( packer ).pack( authToken );
}