private void addTicketAndWait(final String principalId) throws Throwable {
            val authentication = CoreAuthenticationTestUtils.getAuthentication(principalId);
            val tgtId = new TicketGrantingTicketIdGenerator(10, StringUtils.EMPTY)
                    .getNewTicketId(TicketGrantingTicket.PREFIX);
            val tgt = new TicketGrantingTicketImpl(tgtId, authentication, new HardTimeoutExpirationPolicy(2));
            ticketRegistry.addTicket(tgt);
            Thread.sleep(1000);
        }
Unit test for {@link RedisTicketRegistry}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-redis-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/RedisServerTicketRegistryTests.java