@Override
    public Ticket getTicket(final String ticketId, final Predicate<Ticket> predicate) {
        return FunctionUtils.doUnchecked(() -> {
            LOGGER.debug("Locating ticket [{}]", ticketId);
            val encTicketId = digestIdentifier(ticketId);
            if (encTicketId == null) {
                LOGGER.debug("Ticket id [{}] could not be found", ticketId);
                return null;
            }
            val metadata = ticketCatalog.find(ticketId);
            if (metadata == null) {
                LOGGER.debug("Ticket definition [{}] could not be found in the ticket catalog", ticketId);
                return null;
            }
            val collectionName = getTicketCollectionInstanceByMetadata(metadata);
            val documentSnapshot = firestore.collection(collectionName).document(encTicketId).get().get();
            if (documentSnapshot != null) {
                val document = documentSnapshot.toObject(GoogleCloudFirestoreTicketDocument.class);
                if (document != null) {
                    val decoded = deserializeTicket(document.getJson(), document.getType());
                    val result = decodeTicket(decoded);

                    if (predicate.test(result)) {
                        return result;
                    }
                }
            }
            return null;
        });
    }
This is {@link GoogleCloudFirestoreTicketRegistry}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-gcp-firestore-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/GoogleCloudFirestoreTicketRegistry.java