initialSlotMapping);
underTest = new DefaultManagedSlotMappingConfiguration(resolverProvider,
initializer, visualizationModel, errorModel);
VisualItemContainerChangeEventHandler handler = captureVisualItemContainerChangeEventHandler();
when(visualizationModel.getFullVisualItemContainer()).thenReturn(
visualItemContainer);
when(visualItemContainer.getVisualItems()).thenReturn(
CollectionFactory.<VisualItem> createLightweightList());
LightweightList<Slot> badSlots = CollectionFactory
.createLightweightList();
badSlots.add(slots[0]);
when(visualizationModel.getSlotsWithErrors()).thenReturn(badSlots);
LightweightCollection<VisualItem> addedElements = VisualItemTestUtils
.createVisualItems(1);
Delta<VisualItem> delta = Delta.createAddedDelta(addedElements);
// XXX right now underTest does not care what the event is, but it may
// in the future, feel free to implement the event in this test in the
// future
handler.onVisualItemContainerChanged(new VisualItemContainerChangeEvent(
visualItemContainer, delta));
// verify that we set the viewModel
verify(visualizationModel, times(1)).setResolver(slots[0], resolver1);
}