Move method used only in the test to the test code itself
Merge pull request #10333 from ikataitsev/move-test-method-to-tests

Move method used only in the test to the test code itself