public void testTwoChildren() throws Exception {
JSONObject obj = new JSONObject(
"{ \"alice\": { \"bob\" : { \"$\": \"charlie\" }," +
" \"david\": { \"$\": \"edgar\"} } }");
AbstractXMLStreamReader reader = new BadgerFishXMLStreamReader(obj);
assertEquals(XMLStreamReader.START_ELEMENT, reader.next());
assertEquals("alice", reader.getName().getLocalPart());
assertEquals(XMLStreamReader.START_ELEMENT, reader.next());
assertEquals("bob", reader.getName().getLocalPart());
assertEquals(XMLStreamReader.CHARACTERS, reader.next());
assertEquals("charlie", reader.getText());
assertEquals(XMLStreamReader.END_ELEMENT, reader.next());
assertEquals("bob", reader.getName().getLocalPart());
assertEquals(XMLStreamReader.START_ELEMENT, reader.next());
assertEquals("david", reader.getName().getLocalPart());
assertEquals(XMLStreamReader.CHARACTERS, reader.next());
assertEquals("edgar", reader.getText());
assertEquals(XMLStreamReader.END_ELEMENT, reader.next());
assertEquals("david", reader.getName().getLocalPart());
assertEquals(XMLStreamReader.END_ELEMENT, reader.next());
assertEquals("alice", reader.getName().getLocalPart());
}