Refactor test slightly