Refactor test to match new code