@Test
public void refreshModelContent() {

    when(scenarioSimulationModelMock.getSimulation()).thenReturn(simulationMock);
    List<ScenarioWithIndex> scenarioWithIndex = new ArrayList<>();
    int scenarioNumber = 1;
    int scenarioIndex = scenarioNumber - 1;
    Scenario scenario = mock(Scenario.class);
    scenarioWithIndex.add(new ScenarioWithIndex(scenarioNumber, scenario));
    List<BackgroundDataWithIndex> backgroundDataWithIndex = new ArrayList<>();
    BackgroundData backgroundData = mock(BackgroundData.class);
    backgroundDataWithIndex.add(new BackgroundDataWithIndex(scenarioNumber, backgroundData));
    TestResultMessage testResultMessage = mock(TestResultMessage.class);
    SimulationRunResult testRunResult = new SimulationRunResult(scenarioWithIndex, backgroundDataWithIndex, new SimulationRunMetadata(), testResultMessage);
    presenterSpy.refreshModelContent(testRunResult);
    verify(scenarioSimulationViewMock, times(1)).hideBusyIndicator();
    verify(simulationMock, times(1)).replaceData(eq(scenarioIndex), eq(scenario));
    assertEquals(scenarioSimulationModelMock, presenterSpy.getModel());
    verify(scenarioGridWidgetSpy, times(1)).refreshContent(eq(simulationMock));
    assertEquals(scenarioSimulationContextLocal.getStatus().getSimulation(), simulationMock);
    verify(backgroundMock, times(1)).replaceData(eq(scenarioIndex), eq(backgroundData));
    verify(backgroundGridWidgetSpy, times(1)).refreshContent(eq(backgroundMock));
    assertEquals(scenarioSimulationContextLocal.getStatus().getBackground(), backgroundMock);
    assertEquals(scenarioSimulationModelMock, presenterSpy.getModel());
    verify(abstractScenarioSimulationDocksHandlerMock, times(1)).expandTestResultsDock();
    verify(dataManagementStrategyMock, times(1)).setModel(eq(scenarioSimulationModelMock));
    verify(scenarioSimulationEditorWrapperMock, times(1)).onRefreshedModelContent(eq(testRunResult));
}