public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<ResourceComponent<?>> discoveryContext)
throws InvalidPluginConfigurationException, Exception {
ResourceType resourceType = discoveryContext.getResourceType();
DiscoveredResourceDetails resourceDetails1 = new DiscoveredResourceDetails(resourceType,
"key-to-be-aborted", resourceType.getName(), "1.0", resourceType.getDescription(),
discoveryContext.getDefaultPluginConfiguration(), null);
DiscoveredResourceDetails resourceDetails2 = new DiscoveredResourceDetails(resourceType,
"key-ok", resourceType.getName(), "1.0", resourceType.getDescription(),
discoveryContext.getDefaultPluginConfiguration(), null);
Set<DiscoveredResourceDetails> details = new HashSet<DiscoveredResourceDetails>(2);
Collections.addAll(details, resourceDetails1, resourceDetails2);