Moved variant factory methods into TestUtil.java