public void testWrite() throws Exception {
XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(new StringReader(VALID_XML));
//read the original contribution metadata file
AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
ContributionFactory contributionFactory = new DefaultContributionFactory();
ContributionMetadataProcessor processor =
new ContributionMetadataProcessor(assemblyFactory, contributionFactory, null);
Contribution contribution = contributionFactory.createContribution();
contribution.setModelResolver(new TestModelResolver(contribution, null));