} );
String decodedPdu = Strings.dumpBytes(stream.array());
stream.flip();
EncryptionKeyContainer container = new EncryptionKeyContainer();
try
{
krbDecoder.decode( stream, container );
}
catch ( DecoderException de )
{
de.printStackTrace();
fail( de.getMessage() );
}
EncryptionKey encKey = container.getEncryptionKey();
assertEquals( EncryptionType.getTypeByValue( 2 ), encKey.getKeyType() );
assertTrue( Arrays.equals( Strings.getBytesUtf8("keyval"), encKey.getKeyValue() ) );
ByteBuffer bb = ByteBuffer.allocate( encKey.computeLength() );