assertEquals(s.getService(), sreturned.getService());
assertEquals(s.isFromNewLogin(), sreturned.isFromNewLogin());
}
public void testUpdateOfRegistry() {
final TicketGrantingTicket t = new TicketGrantingTicketImpl("test", TestUtils.getAuthentication(), new NeverExpiresExpirationPolicy());
this.ticketRegistry.addTicket(t);
final TicketGrantingTicket returned = (TicketGrantingTicket) this.ticketRegistry.getTicket("test");
final ServiceTicket s = returned.grantServiceTicket("test2", TestUtils.getService(), new NeverExpiresExpirationPolicy(), true);
this.ticketRegistry.addTicket(s);
final ServiceTicket s2 = (ServiceTicket) this.ticketRegistry.getTicket("test2");
assertNotNull(s2.grantTicketGrantingTicket("ff", TestUtils.getAuthentication(), new NeverExpiresExpirationPolicy()));
assertTrue(s2.isValidFor(TestUtils.getService()));
assertTrue(this.wasTicketUpdated);
returned.expire();
assertTrue(t.isExpired());
}