{
fail( de.getMessage() );
}
// Check the decoded TransitedEncoding
TransitedEncoding transitedEncoding = ( ( TransitedEncodingContainer ) transitedEncodingContainer )
.getTransitedEncoding();
assertEquals( TransitedEncodingType.DOMAIN_X500_COMPRESS, transitedEncoding.getTrType() );
assertTrue( Arrays.equals( Strings.getBytesUtf8( "abcdef" ), transitedEncoding.getContents() ) );
// Check the encoding
ByteBuffer bb = ByteBuffer.allocate( transitedEncoding.computeLength() );
try
{
bb = transitedEncoding.encode( bb );
// Check the length
assertEquals( len, bb.limit() );
String encodedPdu = Strings.dumpBytes( bb.array() );