[Refactoring] Fixed some unit tests.