Fix bug in test introduced by automatic refactoring