code: public TenantDefinition searchForTenant(TenantFilter filter) {
          checkServiceState();
          for (TenantDefinition tenantDef : getAllTenantDefs().values()) {
              if (filter.selectTenant(tenantDef)) {
                  return tenantDef;
              }
          }
          return null;
      }
docs: Search for the first {@link TenantDefinition} that is selected by the given filter.
  All current tenant definitions are searched.
  
  @param   filter  {@link TenantFilter} that decides selection criteria.
  @return          First {@link TenantDefinition} selected by the filter or null if
  the search exhausts all known tenants without a selection.