Better refactor test definition