### Question:
RegistryAwareCommandManager implements SessionCommandManager<AbstractCanvasHandler> { public CommandResult<CanvasViolation> execute(final Command<AbstractCanvasHandler, CanvasViolation> command) { return execute(getCanvasHandler(), command); } RegistryAwareCommandManager(); @SuppressWarnings("unchecked") RegistryAwareCommandManager init(final ClientSession session); CommandResult<CanvasViolation> allow(final Command<AbstractCanvasHandler, CanvasViolation> command); CommandResult<CanvasViolation> execute(final Command<AbstractCanvasHandler, CanvasViolation> command); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context); CommandResult<CanvasViolation> undo(); @Override CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context,
                                                final Command<AbstractCanvasHandler, CanvasViolation> command); @Override CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context,
                                                  final Command<AbstractCanvasHandler, CanvasViolation> command); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context,
                                               final Command<AbstractCanvasHandler, CanvasViolation> command); @Override void start(); @Override void rollback(); @Override void complete(); @PreDestroy void destroy();  }### Answer:
@Test public void testExecute() { tested.execute(COMMAND_SUCCESS1); verify(commandManager, times(1)).execute(eq(canvasHandler), eq(COMMAND_SUCCESS1)); verify(commandManager, never()).allow(any(), any()); verify(commandManager, never()).undo(any(), any()); verify(commandRegistry, times(1)).register(any()); assertEquals(1, commandRegistry.getHistory().size()); assertEquals(COMMAND_SUCCESS1, commandRegistry.getHistory().get(0)); verify(commandRegistry, never()).pop(); verify(commandRegistry, never()).peek(); verify(commandRegistry, never()).clear(); }