Fixed tests for refactoring