StAXAttributeProcessorExtensionPoint attributeExtensionPoint = registry.getExtensionPoint(StAXAttributeProcessorExtensionPoint.class);
StAXAttributeProcessor<Object> extensibleStAXAttributeProcessor = new ExtensibleStAXAttributeProcessor(attributeExtensionPoint, inputFactory, outputFactory);
BuilderExtensionPoint builderExtensionPoint = registry.getExtensionPoint(BuilderExtensionPoint.class);
StAXArtifactProcessor processor = artifactExtensionPoint.getProcessor(Definitions.class);
Object artifact = null;
// Read the first definitions string
XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(WS_POLICY1));
artifact = processor.read(reader, new ProcessorContext());
assertNotNull(artifact);
Assert.assertTrue(artifact instanceof Definitions);
Definitions definitions1 = (Definitions) artifact;
// Read the second definitions string
reader = inputFactory.createXMLStreamReader(new StringReader(WS_POLICY2));
artifact = processor.read(reader, new ProcessorContext());
assertNotNull(artifact);
Assert.assertTrue(artifact instanceof Definitions);
Definitions definitions2 = (Definitions) artifact;
// compare the policies using the policy builder