// }
} );
String decodedPdu = Strings.dumpBytes( stream.array() );
stream.flip();
GracefulDisconnectContainer container = new GracefulDisconnectContainer();
try
{
decoder.decode( stream, container );
}
catch ( DecoderException de )
{
de.printStackTrace();
fail( de.getMessage() );
}
GracefulDisconnect gracefulDisconnect = container.getGracefulDisconnect();
assertEquals( 1, gracefulDisconnect.getTimeOffline() );
assertEquals( 1, gracefulDisconnect.getDelay() );
assertEquals( 2, gracefulDisconnect.getReplicatedContexts().size() );
assertEquals( "ldap://directory.apache.org:80/", gracefulDisconnect.getReplicatedContexts().get( 0 ).toString() );
assertEquals( "ldap://ldap.netscape.com/o=Babsco,c=US???(int=%5C00%5C00%5C00%5C04)", gracefulDisconnect