@@ -0,0 +1,948 @@
+package test.factory;%0A%0Aimport org.testng.Assert;%0Aimport org.testng.TestNG;%0Aimport org.testng.annotations.Test;%0Aimport org.testng.collections.Lists;%0A%0Aimport test.SimpleBaseTest;%0A%0Aimport java.util.List;%0A%0Apublic class FactoryInterleavingTest extends SimpleBaseTest %7B%0A%0A  public static List%3CInteger%3E LOG = Lists.newArrayList();%0A%0A  @Test%0A  public void methodsShouldBeInterleaved() %7B%0A    TestNG tng = create(FactoryInterleavingSampleFactory.class);%0A    tng.setPreserveOrder(false);%0A    tng.run();%0A    Integer%5B%5D valid1 = %7B%0A        10, 11, 12, 13,%0A        20, 21, 22, 23,%0A    %7D;%0A%0A    Integer%5B%5D valid2 = %7B%0A        20, 21, 22, 23,%0A        10, 11, 12, 13,%0A    %7D;%0A    Integer%5B%5D logArray = LOG.toArray(new Integer%5BLOG.size()%5D);%0A    if (! logArray.equals(valid1)) %7B%0A      Assert.assertEquals(logArray, valid1);%0A    %7D else if (! logArray.equals(valid2)) %7B%0A      System.err.println(logArray + %22 %22 + valid2);%0A      Assert.assertEquals(logArray, valid2);%0A    %7D%0A  %7D%0A%7D%0A

Fix regression after #1122