* Test a Cancel message with a bad cancelId
*/
@Test
public void testDecodeCancelBadCancelId()
{
Asn1Decoder cancelDecoder = new CancelDecoder();
ByteBuffer stream = ByteBuffer.allocate( 0x08 );
stream.put( new byte[]
{
0x30, 0x06,
0x02, 0x04, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF
} ).flip();
// Allocate a Cancel Container
Asn1Container cancelContainer = new CancelContainer();
// Decode a Cancel message
try
{
cancelDecoder.decode( stream, cancelContainer );
fail( "CancelID expected" );
}
catch ( DecoderException de )
{
assertTrue( true );