@Test
public void freshTicketIsValid() {

  synchronized (TestTicketRsaKeyFileProvider.class) {
    TestTicketRsaKeyFileProvider.clean();
    TestTicketRsaKeyFileProvider.files.add(PRIVATE_PLAIN);
    TestTicketRsaKeyFileProvider.isFilesWithPrivateKeyAreRequired = true;
    startNewContext();
    // GIVEN
    Ticket t = ticketVendor.createDefaultTicketForUser("abc", false);
    // WHEN
    boolean isValid = ticketValidityService.isTicketValid(t);
    // THEN
    Assert.assertTrue(isValid, "Ticket should be valid.");
  }
}