@Override
    public Optional<TenantDefinition> findTenant(final String tenantId) {
        return tenantDefinitionList
            .stream()
            .filter(t -> t.getId().equalsIgnoreCase(tenantId))
            .findFirst();
    }
This is {@link DefaultTenantsManager}.

@author Misagh Moayyed
@since 7.2.0
core/cas-server-core-multitenancy/src/main/java/org/apereo/cas/multitenancy/DefaultTenantsManager.java