fix unit tests after refactoring