I have what looked like a trivial problem in using PojoSR during unit testing, but cannot see the forest for all its trees...
I would simply like to devise a way to register all instances within an Aries ComponentDefinitionRegistry into the PojoServiceRegistry,
as illustrated in the code snippet below.
// Create the PojoServiceRegistry instance.
final ServiceLoader<PojoServiceRegistryFactory> loader = ServiceLoader.load(PojoServiceRegistryFactory.class);
final PojoServiceRegistry registry = loader.iterator().next().newPojoServiceRegistry(serviceRegistryConfiguration);
// Kickstart the D.I. blueprint configuration.
final ServiceReference parserServiceReference = registry.getServiceReference(ParserService.class.getName());
// Parse the Blueprint configuration XML
final ParserService parserService = (ParserService) registry.getService(parserServiceReference);
Assert.assertNotNull("Could not find the blueprint ParserService", parserService);
final URL testBlueprintXml = getClass().getClassLoader().getResource(blueprintConfigurationPath);
Assert.assertNotNull("Could not find the blueprint XML configuration at ["
+ blueprintConfigurationPath + "]", testBlueprintXml);
final ComponentDefinitionRegistry result = parserService.parse(testBlueprintXml, registry.getBundleContext().getBundle());
// Now add all Blueprint-generated instances, services etc. to the PojoSR registry...
// ... but how?