Move method to test module, its only place of use.
Merge pull request #1231 from square/jw/test-method

Move method to test module, its only place of use.