Fix tests after refactoring.