### Question:
XOAIParser { public static Metadata parse(InputStream st) throws XMLStreamException { XOAIParser parser = new XOAIParser(st); return parser.parse(); } XOAIParser(InputStream stream); static Metadata parse(InputStream st); Metadata parse();  }### Answer:
@Test public void testParse() throws Exception { InputStream input = XOAIParserTest.class.getClassLoader().getResourceAsStream("xoai-example.xml"); Metadata output = XOAIParser.parse(input); assertThat(output.getElement().get(0).getName(), is(equalTo("dc"))); }