ValueMap vm = new ValueMapDecorator(Collections.<String, Object>emptyMap());
Resource res = mock(Resource.class);
when(res.adaptTo(ValueMap.class)).thenReturn(vm);
DefaultStringModel model = factory.getAdapter(res, DefaultStringModel.class);
assertNotNull(model);
assertEquals("firstDefault", model.getFirstProperty());
assertEquals(2, model.getSecondProperty().length);
}