NodeIterator { public boolean hasNext() { return next != null; } NodeIterator(List<? extends Node> nodes, boolean ignoreWhitespaceText); boolean hasNext(); boolean nextIsText(); boolean nextIsElement(); boolean nextIsXliffElement(); boolean nextIsXliffElement(String localName); boolean nextIsNonXliffElement(); String getText(); Element getElement(); Element getXliffElement(); Element getNonXliffElement(); Element getXliffElement(String localName); void assertNoMoreNodes(); Element getXliffElement(String... localNames);  }
@Test public void testHasNext() throws ConstraintViolationException { NodeIterator ni; ArrayList<Node> nodes = new ArrayList<Node>(); Document doc = Utils.createDocument(); ni = new NodeIterator(nodes, false); assertFalse(ni.hasNext()); nodes.add(doc.createTextNode(" \r\n")); ni = new NodeIterator(nodes, false); assertTrue(ni.hasNext()); ni.getText(); assertFalse(ni.hasNext()); ni = new NodeIterator(nodes, true); assertFalse(ni.hasNext()); }