### Question:
PubmedXmlParser { public PubmedArticle parseAsArticle(InputStream is) { try { PubmedArticleSet parse = parse(is); return (PubmedArticle) parse.getPubmedArticleOrPubmedBookArticle() .get(0); } catch (Exception e) { return null; } } PubmedXmlParser(); PubmedArticleSet parse(InputStream is); PubmedArticle parseAsArticle(InputStream is); List<MedlineCitation> parseAsArticles(InputStream is);  }### Answer:
@Test public void testParsePubmedXml() throws Exception { InputStream is = ResourceHelper .getInputStream("pubmed_abstracts/16205164.xml"); PubmedArticle art = new PubmedXmlParser().parseAsArticle(is); assertEquals( "High rate of joint capsule matrix turnover in chronic human elbow contractures.", art.getMedlineCitation().getArticle().getArticleTitle() .getvalue()); assertEquals("16205164", art.getMedlineCitation().getPMID().getvalue()); }