### Question:
MenuStore extends Store { @Override public void onAction(Action action) { if (action.getType().equals(ActionType.MENU_ITEM_SELECTED)) { var menuAction = (MenuAction) action; selected = menuAction.getMenuItem(); notifyChange(); } }  @Override void onAction(Action action); MenuItem getSelected();  }### Answer:
@Test public void testOnAction() { final var menuStore = new MenuStore(); final var view = mock(View.class); menuStore.registerView(view); verifyZeroInteractions(view); menuStore.onAction(new ContentAction(Content.COMPANY)); verifyZeroInteractions(view); menuStore.onAction(new MenuAction(MenuItem.PRODUCTS)); verify(view, times(1)).storeChanged(eq(menuStore)); verifyNoMoreInteractions(view); assertEquals(MenuItem.PRODUCTS, menuStore.getSelected()); }