// Path: src/test/java/com/github/havarunner/TestHelper.java
// public static void run(HavaRunner havaRunner, RunNotifier runNotifier) {
//     havaRunner.run(runNotifier);
// }
// 
// Path: src/test/java/com/github/havarunner/TestHelper.java
// public static void runAndIgnoreErrors(HavaRunner havaRunner) {
//     run(havaRunner, new RunNotifier());
// }


import com.github.havarunner.HavaRunner;
import com.github.havarunner.annotation.AfterAll;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import static com.github.havarunner.TestHelper.run;
import static com.github.havarunner.TestHelper.runAndIgnoreErrors;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.junit.Assert.*;
            assertEquals(1, afterMethodCalls.size());
        }

        static class MultipleTests {
            @Test
            void test_1() {
                assertNull(test1MethodCall);
                test1MethodCall = System.currentTimeMillis();
            }

            @Test
            void test_2() {
                assertNull(test2MethodCall);
                test2MethodCall = System.currentTimeMillis();
            }

            @AfterAll
            void cleanUp() throws InterruptedException {
                Thread.sleep(1); // Sleep. Otherwise millisecond-precision is not enough.
                afterMethodCalls.add(System.currentTimeMillis());
            }
        }
    }

    public static class when_test_fails {
        static boolean worldIsBuilt = false;
        static boolean worldIsDestroyed = false;

        @Test
        public void HavaRunner_calls_the_AfterAll_method_even_if_the_test_throws_an_exception() {
// Path: src/test/java/com/github/havarunner/TestHelper.java
// public static void run(HavaRunner havaRunner, RunNotifier runNotifier) {
//     havaRunner.run(runNotifier);
// }
// 
// Path: src/test/java/com/github/havarunner/TestHelper.java
// public static void runAndIgnoreErrors(HavaRunner havaRunner) {
//     run(havaRunner, new RunNotifier());
// }


// Path: src/test/java/com/github/havarunner/beforeafter/AfterAllTest.java
import com.github.havarunner.HavaRunner;
import com.github.havarunner.annotation.AfterAll;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import static com.github.havarunner.TestHelper.run;
import static com.github.havarunner.TestHelper.runAndIgnoreErrors;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.junit.Assert.*;

            assertEquals(1, afterMethodCalls.size());
        }

        static class MultipleTests {
            @Test
            void test_1() {
                assertNull(test1MethodCall);
                test1MethodCall = System.currentTimeMillis();
            }

            @Test
            void test_2() {
                assertNull(test2MethodCall);
                test2MethodCall = System.currentTimeMillis();
            }

            @AfterAll
            void cleanUp() throws InterruptedException {
                Thread.sleep(1); // Sleep. Otherwise millisecond-precision is not enough.
                afterMethodCalls.add(System.currentTimeMillis());
            }
        }
    }

    public static class when_test_fails {
        static boolean worldIsBuilt = false;
        static boolean worldIsDestroyed = false;

        @Test
        public void HavaRunner_calls_the_AfterAll_method_even_if_the_test_throws_an_exception() {
            runAndIgnoreErrors(new HavaRunner(AfterFailingTest.class));