@RepeatedTest(2)
    void verifyLogoutCascades() throws Throwable {
        val originalAuthn = CoreAuthenticationTestUtils.getAuthentication();
        val tgtFactory = (TicketGrantingTicketFactory) ticketFactory.get(TicketGrantingTicket.class);
        val tgt = tgtFactory.create(RegisteredServiceTestUtils.getAuthentication(),
            RegisteredServiceTestUtils.getService());
        newTicketRegistry.addTicket(tgt);

        val oAuthCode = oAuthCodeFactory.create(RegisteredServiceTestUtils.getService(),
            originalAuthn, tgt, Collections.emptySet(),
            "challenge", "challenge_method",
            "client_id", Collections.emptyMap(),
            OAuth20ResponseTypes.CODE, OAuth20GrantTypes.AUTHORIZATION_CODE);

        newTicketRegistry.addTicket(oAuthCode);

        assertNotNull(newTicketRegistry.getTicket(oAuthCode.getId()));
        newTicketRegistry.deleteTicket(tgt.getId());
        assertNull(newTicketRegistry.getTicket(oAuthCode.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