Fixed unit tests after all the refactoring.