### Question:
CommandManagerImpl implements CommandManager<C, V> { @Override public CommandResult<V> undo(final C context, final Command<C, V> command) { return command.undo(context); } CommandManagerImpl(); @Override CommandResult<V> allow(final C context,
                                  final Command<C, V> command); @Override CommandResult<V> execute(final C context,
                                    final Command<C, V> command); @Override CommandResult<V> undo(final C context,
                                 final Command<C, V> command);  }### Answer:
@Test public void testUndo() { when(command.undo(context)).thenReturn(commandResult); CommandResult<Object> result = tested.undo(context, command); verify(command, times(1)).undo(eq(context)); verify(command, times(0)).execute(anyObject()); verify(command, times(0)).allow(anyObject()); assertNotNull(result); assertEquals(commandResult, result); }