Parser parser = Abdera.getNewParser();
InputStream stream = OpenSearchAtomTest.class.getResourceAsStream("/atomResponse.xml");
Document<Element> doc = parser.parse(stream);
IntegerElement tr = doc.getRoot().getFirstChild(OpenSearchConstants.TOTAL_RESULTS);
assertNotNull(tr);
assertEquals(47, tr.getValue());
IntegerElement ipp = doc.getRoot().getFirstChild(OpenSearchConstants.ITEMS_PER_PAGE);
assertNotNull(ipp);
assertEquals(1, ipp.getValue());
IntegerElement si = doc.getRoot().getFirstChild(OpenSearchConstants.START_INDEX);
assertNotNull(si);
assertEquals(1, si.getValue());
Query q = doc.getRoot().getFirstChild(OpenSearchConstants.QUERY);
assertNotNull(q);
assertEquals(Query.Role.REQUEST, q.getRole());
assertEquals(QUERY_TERMS, q.getSearchTerms());