### Question:
ContentStore extends Store { @Override public void onAction(Action action) { if (action.getType().equals(ActionType.CONTENT_CHANGED)) { var contentAction = (ContentAction) action; content = contentAction.getContent(); notifyChange(); } }  @Override void onAction(Action action); Content getContent();  }### Answer:
@Test public void testOnAction() { final var contentStore = new ContentStore(); final var view = mock(View.class); contentStore.registerView(view); verifyZeroInteractions(view); contentStore.onAction(new MenuAction(MenuItem.PRODUCTS)); verifyZeroInteractions(view); contentStore.onAction(new ContentAction(Content.COMPANY)); verify(view, times(1)).storeChanged(eq(contentStore)); verifyNoMoreInteractions(view); assertEquals(Content.COMPANY, contentStore.getContent()); }