ScenarioGridPanelProducer { protected void initGridWidget(final ScenarioGridWidget scenarioGridWidget, final ScenarioGridPanel scenarioGridPanel, final ScenarioSimulationGridPanelClickHandler clickHandler, final ScenarioSimulationGridPanelMouseMoveHandler mouseMoveHandler, final EventBus eventBus) { scenarioGridPanel.setEventBus(eventBus); scenarioContextMenuRegistry.setEventBus(eventBus); clickHandler.setScenarioContextMenuRegistry(scenarioContextMenuRegistry); clickHandler.setScenarioGridPanel(scenarioGridPanel); clickHandler.setEventBus(eventBus); scenarioContextMenuRegistry.setErrorReportPopoverPresenter(errorReportPopupPresenter); mouseMoveHandler.setScenarioGridPanel(scenarioGridPanel); mouseMoveHandler.setErrorReportPopupPresenter(errorReportPopupPresenter); scenarioGridPanel.addHandlers(clickHandler, mouseMoveHandler); scenarioGridWidget.setScenarioGridPanel(scenarioGridPanel); }  @PostConstruct void init(); ScenarioSimulationContext getScenarioSimulationContext(); ScenarioGridPanel getSimulationGridPanel(); ScenarioGridPanel getBackgroundGridPanel(); ScenarioContextMenuRegistry getScenarioContextMenuRegistry(); ScenarioSimulationView getScenarioSimulationView(final EventBus eventBus); ScenarioGridWidget getBackgroundGridWidget(final EventBus eventBus);  }
@Test public void initGridWidget() { scenarioGridPanelProducer.initGridWidget(scenarioGridWidgetSpy, scenarioGridPanelMock, clickHandlerMock, mouseMoveHandlerMock, eventBusMock); verify(scenarioGridPanelMock, times(1)).setEventBus(eq(eventBusMock)); verify(scenarioContextMenuRegistryMock).setEventBus(eventBusMock); verify(clickHandlerMock, times(1)).setScenarioContextMenuRegistry(eq(scenarioGridPanelProducer.getScenarioContextMenuRegistry())); verify(clickHandlerMock, times(1)).setScenarioGridPanel(eq(scenarioGridPanelMock)); verify(clickHandlerMock, times(1)).setEventBus(eq(eventBusMock)); verify(scenarioContextMenuRegistryMock, times(1)).setErrorReportPopoverPresenter(errorReportPopupPresenterMock); verify(mouseMoveHandlerMock, times(1)).setScenarioGridPanel(eq(scenarioGridPanelMock)); verify(mouseMoveHandlerMock, times(1)).setErrorReportPopupPresenter(eq(errorReportPopupPresenterMock)); verify(scenarioGridPanelMock, times(1)).addHandlers(eq(clickHandlerMock), eq(mouseMoveHandlerMock)); verify(scenarioGridWidgetSpy, times(1)).setScenarioGridPanel(eq(scenarioGridPanelMock)); }