} );
String decodedPdu = Strings.dumpBytes( bb.array() );
bb.flip();
GracefulShutdownContainer container = new GracefulShutdownContainer();
try
{
decoder.decode( bb, container );
}
catch ( DecoderException de )
{
de.printStackTrace();
fail( de.getMessage() );
}
GracefulShutdownRequestDecorator gracefulShutdownRequest = container.getGracefulShutdownRequest();
assertEquals( 0, gracefulShutdownRequest.getTimeOffline() );
assertEquals( 32767, gracefulShutdownRequest.getDelay() );
// Check the length
assertEquals( 0x06, gracefulShutdownRequest.computeLengthInternal() );