{
KdcRequest message = new KdcRequest( 5, KerberosMessageType.AS_REP, null, null );
handler.messageReceived( session, message );
ErrorMessage error = ( ErrorMessage ) session.getMessage();
assertEquals( "Incorrect message direction", 47, error.getErrorCode() );
message = new KdcRequest( 5, KerberosMessageType.TGS_REP, null, null );
handler.messageReceived( session, message );
error = ( ErrorMessage ) session.getMessage();
assertEquals( "Incorrect message direction", 47, error.getErrorCode() );
}