Implement undo function for incomplete Command
- included test cases for undo complete and incomplete