package ${packageName};

import static org.junit.Assert.*;

public class ${testClassName} {

    private final ${productionClassName} production = new ${productionClassName}("value");

    @org.junit.Test
    public void testOne() {
        for (int i = 0; i < 500; i++) {
            System.out.println("Some test output from ${testClassName}.testOne - " + i);
            System.err.println("Some test error  from ${testClassName}.testOne - " + i);
        }
        assertEquals(production.getProperty(), "value");
    }

    @org.junit.Test
    public void testTwo() {
        for (int i = 0; i < 500; i++) {
            System.out.println("Some test output from ${testClassName}.testTwo - " + i);
            System.err.println("Some test error  from ${testClassName}.testTwo - " + i);
        }
        String expected = <%= binding.hasVariable("halfTestsFail") && binding.halfTestsFail ? "\"foo\"" : "\"value\"" %>;
        assertEquals(production.getProperty(), expected);
    }
}

@@ -223,19 +223,36 @@
 estOne()
+ throws Exception
  %7B%0A
-
         
@@ -453,32 +453,61 @@
 stOne - %22 + i);%0A
+            Thread.sleep(5);%0A
         %7D%0A      
@@ -609,16 +609,33 @@
 estTwo()
+ throws Exception
  %7B%0A     
@@ -750,32 +750,32 @@
 stTwo - %22 + i);%0A
-
             Syst
@@ -839,32 +839,61 @@
 stTwo - %22 + i);%0A
+            Thread.sleep(5);%0A
         %7D%0A      

Introduce pause in the output so as not to overwhelm the IPC mechanism between test worker and build host.