DataType.NUMBER)));
slotMappingInitializer = new TestSlotMappingInitializer(
initialSlotMapping);
DefaultVisualizationModel model = createViewModel(new ResourceByUriMultiCategorizer());
model.setContentResourceSet(new DefaultResourceSet());
Resource resource1 = ResourceSetTestUtils.createResource(1);
resource1.putValue(property1, 1);
resource1.putValue(property2, 2);
model.getContentResourceSet().add(resource1);
/* Should have 1 View Item with Value 1 */
model.setResolver(requiredSlots[0],
new ManagedVisualItemValueResolverDecorator(resolverId2,
new FirstResourcePropertyResolver(property2,
DataType.NUMBER)));
/* Should have 1 View Item with Value 2 */
LightweightCollection<VisualItem> visualItems = model
.getFullVisualItemContainer().getVisualItems();
assertTrue(visualItems.size() == 1);
VisualItem item = visualItems.iterator().next();
assertEquals(2, item.getValue(requiredSlots[0]));
}