@Test
public void testNewTicket() 
{

	int validity = 10;
	DateTime start = new DateTime();
	LoginTicket ticket = LoginTicket.newTicket(validity, "test", "testUser");
	DateTime end = new DateTime();
	
	assertNotNull(ticket);
	assertEquals(validity, ticket.getValidityDuration().getStandardSeconds());
	assertEquals("test", ticket.getRequistingApplication());
	assertEquals("testUser", ticket.getRequestingApplicationUsername());
	assertTrue(ticket.getCreationTime().compareTo(start) >= 0);
	assertTrue(ticket.getCreationTime().compareTo(end) <= 0);
}