### Question:
DMNIncludedModelHandler implements DRGElementHandler { void updateDRGElementName(final DRGElement drgElement, final String newName) { sessionCommandManager.execute(getCanvasHandler(), buildUpdateCommand(drgElement, newName)); } @Inject  DMNIncludedModelHandler(final DMNGraphUtils dmnGraphUtils,
                                   final @DMNEditor DefaultCanvasCommandFactory canvasCommandFactory,
                                   final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                   final DefinitionUtils definitionUtils); @Override void update(final String oldModelName,
                       final String newModelName); @Override void destroy(final String oldModelName);  }### Answer:
@Test public void testUpdateDRGElementName() { final DRGElement drgElement = mock(DRGElement.class); final AbstractCanvasHandler canvasHandler = mock(AbstractCanvasHandler.class); final String newName = "new name"; when(dmnGraphUtils.getCanvasHandler()).thenReturn(canvasHandler); doReturn(compositeCommand).when(handler).buildUpdateCommand(drgElement, newName); handler.updateDRGElementName(drgElement, newName); verify(sessionCommandManager).execute(canvasHandler, compositeCommand); }