when(res.getChild("emptyChild")).thenReturn(emptyChild);
ParentModel model = factory.getAdapter(res, ParentModel.class);
assertNotNull(model);
ChildModel childModel = model.getFirstChild();
assertNotNull(childModel);
assertEquals(firstValue, childModel.getProperty());
assertEquals(2, model.getGrandChildren().size());
assertEquals(firstGrandChildValue, model.getGrandChildren().get(0).getProperty());
assertEquals(secondGrandChildValue, model.getGrandChildren().get(1).getProperty());
assertEquals(0, model.getEmptyGrandChildren().size());
}