* Test the decoding of a GracefulDisconnect with an empty TimeOffline
*/
@Test
public void testDecodeGracefulDisconnectTimeOfflineEmpty()
{
Asn1Decoder decoder = new GracefulDisconnectDecoder();
ByteBuffer bb = ByteBuffer.allocate( 0x0b );
bb.put( new byte[]
{ 0x30, 0x02, // GracefulDisconnect ::= SEQUENCE {
0x02,
0x00 // timeOffline INTEGER (0..720) DEFAULT 0,
} );
bb.flip();
GracefulDisconnectContainer container = new GracefulDisconnectContainer();
try
{
decoder.decode( bb, container );
}
catch ( DecoderException de )
{
assertTrue( true );
return;