@Override
    public TicketDefinition find(final String ticketId) {
        val index = ticketId.indexOf(UniqueTicketIdGenerator.SEPARATOR);
        val prefix = index == -1 ? ticketId : ticketId.substring(0, index);

        val definition = ticketMetadataMap.values()
            .stream()
            .filter(md -> prefix.equalsIgnoreCase(md.getPrefix()))
            .findFirst()
            .orElse(null);
        if (definition == null) {
            LOGGER.error("Ticket definition for [{}] cannot be found in the ticket catalog "
                         + "which only contains the following ticket types: [{}]", ticketId, ticketMetadataMap.keySet());
        }
        return definition;
    }
This is {@link DefaultTicketCatalog}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/DefaultTicketCatalog.java