public void testAbstractFeature() 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 builderD = new DefaultResourceBuilder();
ResourceIdentity residD = ResourceIdentity.create(RESOURCE_D, Version.emptyVersion);
Map<String, Object> attsD = builderD.addIdentityCapability(residD).getAttributes();
attsD.put(ContentNamespace.CAPABILITY_RUNTIME_NAME_ATTRIBUTE, RESOURCE_D + ".war");
builderD.addContentCapability(deployer.getDeployment(RESOURCE_D));
Resource resD = builderD.getResource();