assertEquals("4", source.getQueryId());
assertFalse(source.hasNext());
}
@Test public void testTwoClosing() throws Exception {
QuerySource source = processString(
"<top>\n<num> Number: 4\n</num><title> defination Gravitational\n</title></top>"
+ "<top>\n<num> Number: 5\n</num><title> another query\n</title></top>"
);
String query;
assertTrue(source.hasNext());
query = source.next();
assertEquals("defination gravitational", query);
assertEquals("4", source.getQueryId());
assertTrue(source.hasNext());
query = source.next();
assertEquals("another query", query);
assertEquals("5", source.getQueryId());
assertFalse(source.hasNext());
}