@@ -0,0 +1,1356 @@
+package jfdi.test.logic.commands;%0A%0Aimport jfdi.logic.commands.AliasCommand;%0Aimport jfdi.logic.commands.UndoCommand;%0Aimport jfdi.logic.events.UndoFailedEvent;%0Aimport jfdi.logic.interfaces.Command;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0Aimport static org.junit.Assert.*;%0Aimport static org.mockito.Mockito.*;%0A%0A/**%0A * @author Liu Xinan%0A */%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class UndoCommandTest extends CommonCommandTest %7B%0A%0A    @Test%0A    public void testExecute_successful() throws Exception %7B%0A        AliasCommand aliasCommand = mock(AliasCommand.class);%0A        doCallRealMethod().when(aliasCommand).pushToUndoStack();%0A%0A        aliasCommand.pushToUndoStack();%0A%0A        UndoCommand undoCommand = new UndoCommand.Builder().build();%0A%0A        undoCommand.execute();%0A%0A        verify(aliasCommand).undo();%0A    %7D%0A%0A    @Test%0A    public void testExecute_unsuccessful() throws Exception %7B%0A        Command.getUndoStack().clear();%0A%0A        UndoCommand undoCommand = new UndoCommand.Builder().build();%0A%0A        undoCommand.execute();%0A%0A        verify(eventBus).post(any(UndoFailedEvent.class));%0A    %7D%0A%0A    @Test%0A    public void undo() throws Exception %7B%0A        UndoCommand command = new UndoCommand.Builder().build();%0A%0A        thrown.expect(AssertionError.class);%0A        command.undo();%0A    %7D%0A%0A%7D%0A

Add test for `UndoCommand`