public void testProvisionAbstractFeature() throws Exception {
Provisioner provisioner = ServiceLocator.getRequiredService(Provisioner.class);
// Provision the camel.core feature
ResourceIdentity identity = ResourceIdentity.fromString("camel.core.feature:0.0.0");
Requirement req = new IdentityRequirementBuilder(identity).getRequirement();
Set<ResourceHandle> result = provisioner.provisionResources(Collections.singleton(req));
List<ResourceHandle> handles = new ArrayList<>(result);
try {
// Verify the wiring
Environment environment = provisioner.getEnvironment();
Map<Resource, Wiring> wirings = environment.getWirings();
ResourceIdentity residA = ResourceIdentity.create("org.apache.camel.core", "2.11.0");
Resource resA = environment.getResource(residA);
Assert.assertNotNull("Resource in environment", resA);
Wiring wiringA = wirings.get(resA);
Assert.assertNotNull("Wiring in environment", wiringA);
Assert.assertEquals("Two required wires", 2, wiringA.getRequiredResourceWires(null).size());
// Build a resource that has a class loading dependency
DefaultResourceBuilder builder = new DefaultResourceBuilder();
ResourceIdentity residB = ResourceIdentity.create(RESOURCE_D, Version.emptyVersion);
Capability icap = builder.addIdentityCapability(residB);
icap.getAttributes().put(IdentityNamespace.CAPABILITY_RUNTIME_NAME_ATTRIBUTE, RESOURCE_D + ".war");
builder.addContentCapability(deployer.getDeployment(RESOURCE_D));
Resource resB = builder.getResource();