@BeforeEach
    void initialize(final TestInfo info, final RepetitionInfo repetitionInfo) {
        if (info.getTags().contains("TicketRegistryTestWithEncryption")) {
            useEncryption = true;
        } else if (info.getTags().contains("TicketRegistryTestWithoutEncryption")) {
            useEncryption = false;
        } else {
            useEncryption = repetitionInfo.getTotalRepetitions() == 2 && repetitionInfo.getCurrentRepetition() == 2;
        }
        ticketRegistry = this.getNewTicketRegistry();
        if (ticketRegistry != null) {
            if (!info.getTags().contains("SkipClearingTicketRegistry")) {
                ticketRegistry.deleteAll();
            }
            setUpEncryption();
        }
    }
This is {@link BaseTicketRegistryTests}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-tickets/src/test/java/org/apereo/cas/ticket/registry/BaseTicketRegistryTests.java