GridContextMenu extends AbstractHeaderMenuPresenter { public void show(final GridWidget gridWidget, final int mx, final int my, int rowIndex) { show(gridWidget, mx, my); mapEvent(insertRowAboveLIElement, new InsertRowEvent(gridWidget, rowIndex)); mapEvent(insertRowBelowLIElement, new InsertRowEvent(gridWidget, rowIndex + 1)); mapEvent(duplicateRowLIElement, new DuplicateRowEvent(gridWidget, rowIndex)); mapEvent(deleteRowLIElement, new DeleteRowEvent(gridWidget, rowIndex)); if (Objects.equals(GridWidget.BACKGROUND, gridWidget)) { updateMenuItemAttributes(gridTitleElement , GRIDCONTEXTMENU_GRID_TITLE, constants.background(), "background"); } else if (Objects.equals(GridWidget.SIMULATION, gridWidget)) { updateMenuItemAttributes(gridTitleElement , GRIDCONTEXTMENU_GRID_TITLE, constants.scenario(), "scenario"); } }  @Override void initMenu(); void show(final GridWidget gridWidget, final int mx, final int my, int rowIndex);  }
@Test public void show_Simulation() { show(gridContextMenuSpy, GridWidget.SIMULATION, ScenarioSimulationEditorConstants.INSTANCE.scenario(), "scenario", 0, 0, 1); }
@Test public void show_Background() { String expectedLabel; show(gridContextMenuSpy, GridWidget.BACKGROUND, ScenarioSimulationEditorConstants.INSTANCE.background(), "background", 0, 0, 1); }