{
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
.getReplicatedContexts().get( 1 ).toString() );
// Check the length
assertEquals( 0x70, gracefulDisconnect.computeLength() );
// Check the encoding
try
{
ByteBuffer bb = gracefulDisconnect.encode();
String encodedPdu = Strings.dumpBytes( bb.array() );
assertEquals( encodedPdu, decodedPdu );
}