@Test
public void onUberfireDocksInteractionEvent() {

    UberfireDocksInteractionEvent uberfireDocksInteractionEventMock = mock(UberfireDocksInteractionEvent.class);
    doReturn(false).when(presenterSpy).isUberfireDocksInteractionEventToManage(uberfireDocksInteractionEventMock);
    presenterSpy.onUberfireDocksInteractionEvent(uberfireDocksInteractionEventMock);
    verify(presenterSpy, times(1)).isUberfireDocksInteractionEventToManage(eq(uberfireDocksInteractionEventMock));
    verify(uberfireDocksInteractionEventMock, never()).getTargetDock();
    verify(presenterSpy, never()).populateRightDocks(anyString());
    verify(scenarioSimulationEditorWrapperMock, never()).populateDocks(anyString());
    //
    reset(presenterSpy);
    presenterSpy.dataManagementStrategy = null;
    presenterSpy.onUberfireDocksInteractionEvent(uberfireDocksInteractionEventMock);
    verify(presenterSpy, times(1)).isUberfireDocksInteractionEventToManage(eq(uberfireDocksInteractionEventMock));
    verify(presenterSpy, never()).populateRightDocks(anyString());
    verify(scenarioSimulationEditorWrapperMock, never()).populateDocks(anyString());
    //
    reset(presenterSpy);
    reset(uberfireDocksInteractionEventMock);
    presenterSpy.dataManagementStrategy = dataManagementStrategyMock;
    UberfireDock targetDockMock = mock(UberfireDock.class);
    when(uberfireDocksInteractionEventMock.getTargetDock()).thenReturn(targetDockMock);
    doReturn(true).when(presenterSpy).isUberfireDocksInteractionEventToManage(uberfireDocksInteractionEventMock);
    when(targetDockMock.getIdentifier()).thenReturn(SettingsPresenter.IDENTIFIER);
    when(targetDockMock.getPlaceRequest()).thenReturn(placeRequestMock);
    presenterSpy.onUberfireDocksInteractionEvent(uberfireDocksInteractionEventMock);
    verify(presenterSpy, times(1)).isUberfireDocksInteractionEventToManage(eq(uberfireDocksInteractionEventMock));
    verify(uberfireDocksInteractionEventMock, times(2)).getTargetDock(); // It's invoked twice
    verify(presenterSpy, times(1)).populateRightDocks(eq(SettingsPresenter.IDENTIFIER));
    verify(scenarioSimulationEditorWrapperMock, times(1)).populateDocks(eq(SettingsPresenter.IDENTIFIER));
    //
    reset(presenterSpy);
    reset(uberfireDocksInteractionEventMock);
    presenterSpy.dataManagementStrategy = dataManagementStrategyMock;
    when(uberfireDocksInteractionEventMock.getTargetDock()).thenReturn(targetDockMock);
    doReturn(true).when(presenterSpy).isUberfireDocksInteractionEventToManage(uberfireDocksInteractionEventMock);
    when(targetDockMock.getIdentifier()).thenReturn(CheatSheetPresenter.IDENTIFIER);
    when(targetDockMock.getPlaceRequest()).thenReturn(placeRequestMock);
    presenterSpy.onUberfireDocksInteractionEvent(uberfireDocksInteractionEventMock);
    verify(presenterSpy, times(1)).isUberfireDocksInteractionEventToManage(eq(uberfireDocksInteractionEventMock));
    verify(uberfireDocksInteractionEventMock, times(2)).getTargetDock(); // It's invoked twice
    verify(presenterSpy, times(1)).populateRightDocks(eq(CheatSheetPresenter.IDENTIFIER));
    verify(scenarioSimulationEditorWrapperMock, times(1)).populateDocks(eq(CheatSheetPresenter.IDENTIFIER));
    //
    reset(presenterSpy, scenarioSimulationEditorWrapperMock, uberfireDocksInteractionEventMock);
    presenterSpy.dataManagementStrategy = dataManagementStrategyMock;
    when(uberfireDocksInteractionEventMock.getTargetDock()).thenReturn(targetDockMock);
    doReturn(true).when(presenterSpy).isUberfireDocksInteractionEventToManage(uberfireDocksInteractionEventMock);
    when(targetDockMock.getIdentifier()).thenReturn(TestToolsPresenter.IDENTIFIER);
    when(targetDockMock.getPlaceRequest()).thenReturn(placeRequestMock);
    presenterSpy.onUberfireDocksInteractionEvent(uberfireDocksInteractionEventMock);
    verify(presenterSpy, times(1)).isUberfireDocksInteractionEventToManage(eq(uberfireDocksInteractionEventMock));
    verify(uberfireDocksInteractionEventMock, times(1)).getTargetDock();
    verify(presenterSpy, never()).populateRightDocks(anyString());
    verify(scenarioSimulationEditorWrapperMock, never()).populateDocks(anyString());
}