Add unit tests for `remove` function.