### Question:
DMNEditorSession extends DefaultEditorSession implements DMNSession { @Override public Registry<org.kie.workbench.common.stunner.core.command.Command<AbstractCanvasHandler, CanvasViolation>> getCommandRegistry() { return registryProvider.getCurrentCommandRegistry(); } @Inject  DMNEditorSession(final ManagedSession session,
                            final CanvasCommandManager<AbstractCanvasHandler> canvasCommandManager,
                            final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                            final Registry<org.kie.workbench.common.stunner.core.command.Command<AbstractCanvasHandler, CanvasViolation>> commandRegistry,
                            final Event<RegisterChangedEvent> registerChangedEvent,
                            final RegistryProvider registryProvider); @Override Registry<org.kie.workbench.common.stunner.core.command.Command<AbstractCanvasHandler, CanvasViolation>> getCommandRegistry(); @Override ManagedSession getSession(); @Override void init(final Metadata metadata,
                     final Command callback); @Override ExpressionGridCache getExpressionGridCache(); @Override DMNGridPanel getGridPanel(); @Override DMNGridLayer getGridLayer(); @Override CellEditorControlsView.Presenter getCellEditorControls(); @Override RestrictedMousePanMediator getMousePanMediator(); @Override ExpressionEditorView.Presenter getExpressionEditor();  }### Answer:
@Test public void testGetCommandRegistry() { final Registry expectedRegistry = mock(Registry.class); when(registryProvider.getCurrentCommandRegistry()).thenReturn(expectedRegistry); final Registry actualRegistry = session.getCommandRegistry(); assertEquals(expectedRegistry, actualRegistry); }