### Question:
DMNProjectToolbarStateHandler implements ToolbarStateHandler { @Override public void enterGraphView() { commandStates.entrySet().forEach(entry -> { final Class<? extends ClientSessionCommand> command = entry.getKey(); projectEditorMenuSessionItems.setItemEnabled(command, entry.getValue()); }); } @SuppressWarnings("unchecked")  DMNProjectToolbarStateHandler(final AbstractDiagramEditorMenuSessionItems projectEditorMenuSessionItems); @Override void enterGridView(); @Override void enterGraphView();  }### Answer:
@Test public void testEnterGraphView() { toolbarStateHandler.enterGridView(); toolbarStateHandler.enterGraphView(); verify(editorMenuSessionItems).setItemEnabled(ClearSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(SwitchGridSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(VisitGraphSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(DeleteSelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(CutSelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(CopySelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(PasteSelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(PerformAutomaticLayoutCommand.class, true); }
@Test public void testEnterGraphView() { toolbarStateHandler.enterGridView(); toolbarStateHandler.enterGraphView(); verify(editorMenuSessionItems).setItemEnabled(ClearSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(SwitchGridSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(VisitGraphSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(DeleteSelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(CutSelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(CopySelectionSessionCommand.class, true); verify(editorMenuSessionItems).setItemEnabled(PasteSelectionSessionCommand.class, true); }