```
if (this.redoStack.Count > 0)
{
    throw new InvalidOperationException(
        "UndoStack cannot be pop with non-empty RedoStack");
}
```

Also add test cases for this :)