Fix unit test due to refactoring