{
fail( de.getMessage() );
}
// Check the decoded PaEncTimestamp
PaEncTimestamp paEncTimestamp = ( ( PaEncTimestampContainer ) paEncTimestampContainer ).getPaEncTimestamp();
assertEquals( EncryptionType.AES256_CTS_HMAC_SHA1_96, paEncTimestamp.getEType() );
assertEquals( 5, paEncTimestamp.getKvno() );
assertTrue( Arrays.equals( Strings.getBytesUtf8( "abcdef" ), paEncTimestamp.getCipher() ) );
// Check the encoding
ByteBuffer bb = ByteBuffer.allocate( paEncTimestamp.computeLength() );
try
{
bb = paEncTimestamp.encode( bb );
// Check the length
assertEquals( 0x16, bb.limit() );
String encodedPdu = Strings.dumpBytes( bb.array() );