@RepeatedTest(2)
    @Transactional(transactionManager = "ticketTransactionManager", readOnly = false)
    void verifyRegistryQuery() throws Throwable {
        val tgt = new TicketGrantingTicketImpl("TGT-335500",
            CoreAuthenticationTestUtils.getAuthentication(), NeverExpiresExpirationPolicy.INSTANCE);
        val registry = getNewTicketRegistry();
        registry.addTicket(tgt);
        assertEquals(1, registry.query(TicketRegistryQueryCriteria.builder()
            .count(1L).type(TicketGrantingTicket.PREFIX).decode(true).build()).size());
    }
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