protected void runTestProfiled() throws Throwable {
   // Warmup run, notably to trigger all needed classloading.
   super.runTest();
   long t0 = System.nanoTime();
   try {
     super.runTest();
   } finally {
     long elapsedMillis = millisElapsedSince(t0);
     if (elapsedMillis >= profileThreshold)
       System.out.printf("%n%s: %d%n", toString(), elapsedMillis);
   }
 }
 private void runTest(TestCase testCase) {
   for (Harness harness : harnesses) {
     try {
       testCase.runTest(harness);
     } catch (MockitoAssertionError e) {
       throw new Error("Failed to get expected call on " + harness, e);
     }
   }
 }
 protected void runTest() throws Throwable {
   if (profileTests) runTestProfiled();
   else super.runTest();
 }