ValueMap vm = new ValueMapDecorator(map);
Resource res = mock(Resource.class);
when(res.adaptTo(ValueMap.class)).thenReturn(vm);
ArrayWrappersModel model = factory.getAdapter(res, ArrayWrappersModel.class);
assertNotNull(model);
Integer[] intArray = model.getIntArray();
assertEquals(4, intArray.length);
assertEquals(new Integer(2), intArray[1]);
Integer[] secondIntArray = model.getSecondIntArray();
assertEquals(4, secondIntArray.length);
assertEquals(new Integer(2), secondIntArray[1]);
}