@RepeatedTest(2)
    void verifyCount() {
        val authentication = CoreAuthenticationTestUtils.getAuthentication(UUID.randomUUID().toString());
        val ticketGrantingTicketToAdd = Stream.generate(() -> {
                val tgtId = new TicketGrantingTicketIdGenerator(10, StringUtils.EMPTY)
                    .getNewTicketId(TicketGrantingTicket.PREFIX);
                return new TicketGrantingTicketImpl(tgtId, authentication, NeverExpiresExpirationPolicy.INSTANCE);
            })
            .limit(5);
        getNewTicketRegistry().addTicket(ticketGrantingTicketToAdd);
        val count = getNewTicketRegistry().countTickets();
        assertTrue(count > 0);
    }
This is {@link MongoDbTicketRegistryTests}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-mongo-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/MongoDbTicketRegistryTests.java