Fixes error in test refactoring