@Override
  public List<ResourceType> findAllResourceTypes() {

    ResourceTypeCriteria resourceTypeCrit = new ResourceTypeCriteria();
    resourceTypeCrit.fetchMetricDefinitions(true);
    List<ResourceType> resourceTypeList =
        resourceTypeManagerRemote.findResourceTypesByCriteria(
            baseRemote.getSubject(), resourceTypeCrit);

    return resourceTypeList;
  }
 @Override
 public ResourceType findResourceType(String name, String pluginType, String resourceCategory) {
   ResourceTypeCriteria crit = new ResourceTypeCriteria();
   crit.addFilterName(name);
   crit.addFilterCategory(ResourceCategory.valueOf(resourceCategory));
   crit.addFilterPluginName(pluginType);
   crit.fetchMetricDefinitions(true);
   crit.setStrict(true);
   List<ResourceType> resourceTypes =
       resourceTypeManagerRemote.findResourceTypesByCriteria(baseRemote.getSubject(), crit);
   if (resourceTypes.size() > 1) {
     throw new IllegalStateException(
         "More than one resource type found. Expected only one resource type");
   }
   return resourceTypes.get(0);
 }