[BUG #8618] Moved a method only used by one test to the test file