int streamLen = data.length;
ByteBuffer stream = ByteBuffer.wrap( data );
Asn1Decoder decoder = new Asn1Decoder();
KrbSafeContainer container = new KrbSafeContainer( stream );
try
{
decoder.decode( stream, container );
}
catch ( DecoderException e )
{
e.printStackTrace();
fail();
}
KrbSafe krbSafe = container.getKrbSafe();
assertEquals( 5, krbSafe.getProtocolVersionNumber() );
assertEquals( KerberosMessageType.KRB_SAFE, krbSafe.getMessageType() );
assertNotNull( krbSafe.getChecksum() );
assertNotNull( krbSafe.getSafeBody() );