InputStream in = FOMTest.class.getResourceAsStream("/simple.xml");
Document<Feed> doc = getParser().parse(in);
Feed feed = doc.getRoot();
XPath xpath = getXPath();
assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);