ValueMap vm = new ValueMapDecorator(map);
Resource res = mock(Resource.class);
when(res.adaptTo(ValueMap.class)).thenReturn(vm);
SimplePropertyModel model = factory.getAdapter(res, SimplePropertyModel.class);
assertNotNull(model);
assertEquals("first-value", model.getFirst());
assertNull(model.getSecond());
assertEquals("third-value", model.getThirdProperty());
assertEquals(3, model.getIntProperty());
String[] array = model.getArrayProperty();
assertEquals(2, array.length);
assertEquals("three", array[0]);
assertTrue(model.isPostConstructCalled());
}