this.ticketRegistry = new TestDistributedTicketRegistry();
this.wasTicketUpdated = false;
}
public void testProxiedInstancesEqual() {
final TicketGrantingTicket t = new TicketGrantingTicketImpl("test", TestUtils.getAuthentication(), new NeverExpiresExpirationPolicy());
this.ticketRegistry.addTicket(t);
final TicketGrantingTicket returned = (TicketGrantingTicket) this.ticketRegistry.getTicket("test");
assertEquals(t, returned);
assertEquals(returned, t);
assertEquals(t.getCreationTime(), returned.getCreationTime());
assertEquals(t.getAuthentication(), returned.getAuthentication());
assertEquals(t.getCountOfUses(), returned.getCountOfUses());
assertEquals(t.getGrantingTicket(), returned.getGrantingTicket());
assertEquals(t.getId(), returned.getId());
assertEquals(t.getChainedAuthentications(), returned.getChainedAuthentications());
assertEquals(t.isExpired(), returned.isExpired());
assertEquals(t.isRoot(), returned.isRoot());
final ServiceTicket s = t.grantServiceTicket("stest", TestUtils.getService(), new NeverExpiresExpirationPolicy(), false);
this.ticketRegistry.addTicket(s);
final ServiceTicket sreturned = (ServiceTicket) this.ticketRegistry.getTicket("stest");
assertEquals(s, sreturned);
assertEquals(sreturned, s);