docs: @Nullable protected <T> T getSingleResource(final SearchFilter sf,
          final ResourceType resourceType, final Class<T> type) throws FlexiantException {
          try {
              ListResult result = this.getService().listResources(sf, null, resourceType);
  
              if (result.getList().size() > 1) {
                  throw new FlexiantException("Found multiple resources, single resource expected.");
              }
  
              if (result.getList().isEmpty()) {
                  return null;
              }
  
              //noinspection unchecked
              return (T) result.getList().get(0);
  
          } catch (ExtilityException e) {
              throw new FlexiantException("Error while retrieving resources", e);
          }
      }