@RepeatedTest(2)
    void verifySecurityTokenTicket() throws Throwable {
        val securityTokenTicketFactory = new DefaultSecurityTokenTicketFactory(
            new DefaultUniqueTicketIdGenerator(),
            neverExpiresExpirationPolicyBuilder());

        val originalAuthn = CoreAuthenticationTestUtils.getAuthentication();
        val ticketGrantingTicketId = TestTicketIdentifiers.generate().ticketGrantingTicketId();
        val tgt = new TicketGrantingTicketImpl(ticketGrantingTicketId,
            originalAuthn, NeverExpiresExpirationPolicy.INSTANCE);
        newTicketRegistry.addTicket(tgt);

        val token = securityTokenTicketFactory.create(tgt, "dummy-token".getBytes(StandardCharsets.UTF_8));
        newTicketRegistry.addTicket(token);

        assertNotNull(newTicketRegistry.getTicket(token.getId()));
        newTicketRegistry.deleteTicket(token);
        assertNull(newTicketRegistry.getTicket(token.getId()));
    }
Unit test for {@link JpaTicketRegistry} class.

@author Marvin S. Addison
@since 3.0.0
support/cas-server-support-jpa-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/BaseJpaTicketRegistryTests.java