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