}
public void testReadInvalid() throws Exception {
XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(new StringReader(INVALID_XML));
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));
try {
processor.read(reader);
fail("InvalidException should have been thrown");
} catch (ContributionReadException e) {