public class ArrayElementsTest extends TestElementBaseClass {
@Test
public void testArrayObjects() {
ObjectNodeImpl element = new ObjectNodeImpl(parseJson("{ \"one\" : 2, \"results\" : [ { \"a\" : 1 }, { \"b\" : 2 } ] }"));
List<JsonNode> array = element.getChildren("results");
assertNotNull(array);
assertEquals("results", array.get(0).getName());
assertEquals(element, array.get(0).getParent());
assertEquals("1", array.get(0).getAttribute("a"));
assertEquals("2", array.get(1).getAttribute("b"));