[Refactoring] Fixed unit tests.