This method is used only by test, isn't it?

I think the common practice is not mix helper functions for production code and testing code. In this sense, I would create a "paralel" Utils class in the test package, moving this method to that one.