KDCReply reply = (KDCReply) KDCReply.AS_REP_ASN1.decode(enc);
assertEquals("msg-type", KDCReply.AS_REP, reply.getMsgtype());
assertEquals("crealm", "MY.REALM", reply.getCrealm());
assertEquals("cname", new PrincipalName(1, new String[] { "me" }),
reply.getCname());
// ticket
Ticket ticket = reply.getTicket();
assertEquals("ticket's realm", "MY.REALM", ticket.getRealm());
assertEquals("ticket's sname", new PrincipalName(0, new String[] {
"krbtgt", "MY.REALM" }), ticket.getSname());
// enc-part
EncryptedData encPart = reply.getEncPart();
assertEquals("etype", 3, encPart.getEtype());