DefaultResourceModel resourceModel = new DefaultResourceModel(
resourceSetFactory);
DefaultSelectionModel selectionModel = new DefaultSelectionModel(
mock(LabelProvider.class), resourceSetFactory);
DefaultVisualizationModelTestHelper helper = new DefaultVisualizationModelTestHelper();
helper.setSlots(slots);
helper.setContainedResources(resourceModel.getResources());
helper.setSelectedResources(selectionModel.getSelection());
originalVisualizationModel = helper.createTestVisualizationModel();
originalConfiguration = new DefaultManagedSlotMappingConfiguration(
resolverProvider, mock(SlotMappingInitializer.class),
originalVisualizationModel, originalVisualizationModel);
originalView = createView(originalVisualizationModel,
resourceModel, selectionModel, originalConfiguration);
}
{
ResourceSetFactory resourceSetFactory = new DefaultResourceSetFactory();
DefaultResourceModel resourceModel = new DefaultResourceModel(
resourceSetFactory);
DefaultSelectionModel selectionModel = new DefaultSelectionModel(
mock(LabelProvider.class), resourceSetFactory);
DefaultVisualizationModelTestHelper helper = new DefaultVisualizationModelTestHelper();
helper.setSlots(slots);
helper.setContainedResources(resourceModel.getResources());
helper.setSelectedResources(selectionModel.getSelection());
restoredVisualizationModel = helper.createTestVisualizationModel();
restoredConfiguration = new DefaultManagedSlotMappingConfiguration(
resolverProvider, mock(SlotMappingInitializer.class),
restoredVisualizationModel, restoredVisualizationModel);
restoredView = createView(restoredVisualizationModel,
resourceModel, selectionModel, restoredConfiguration);