Implement collection modification operations and cover it with tests.