when(child.adaptTo(ValueMap.class)).thenReturn(map);
Resource res = mock(Resource.class);
when(res.getChild("firstChild")).thenReturn(child);
ChildValueMapModel model = factory.getAdapter(res, ChildValueMapModel.class);
assertNotNull(model);
assertEquals(map, model.getFirstChild());
}