modelFactories.addFactory(testFactory);
// Add the test implementation extension to the StAXArtifactProcessor
// extension point
StAXArtifactProcessorExtensionPoint processors = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
TestImplementationProcessor implementationArtifactProcessor = new TestImplementationProcessor(testFactory);
processors.addArtifactProcessor(implementationArtifactProcessor);
// Add the test provider factory to the ProviderFactory extension point
ProviderFactoryExtensionPoint providerFactories = registry.getExtensionPoint(ProviderFactoryExtensionPoint.class);
providerFactories.addProviderFactory(new TestImplementationProviderFactory());