Parser parser = Abdera.getNewParser();
InputStream stream = OpenSearchAtomTest.class.getResourceAsStream("/opensearchDescription.xml");
Document<Element> doc = parser.parse(stream);
StringElement shortName = doc.getRoot().getFirstChild(OpenSearchConstants.SHORT_NAME);
assertNotNull(shortName);
assertEquals(SHORT_NAME, shortName.getValue());
StringElement description = doc.getRoot().getFirstChild(OpenSearchConstants.DESCRIPTION);
assertNotNull(description);
assertEquals(DESCRIPTION, description.getValue());
StringElement tags = doc.getRoot().getFirstChild(OpenSearchConstants.TAGS);
assertNotNull(tags);
assertEquals(TAGS, tags.getValue());
Query q = doc.getRoot().getFirstChild(OpenSearchConstants.QUERY);
assertNotNull(q);
assertEquals(Query.Role.EXAMPLE, q.getRole());
assertEquals(QUERY_TERMS, q.getSearchTerms());