// Path: src/main/java/j8spec/J8Spec.java
// public static synchronized void beforeAll(UnsafeBlock block) {
//     isValidContext("beforeAll");
//     contexts.get().current().addBeforeAll(block);
// }
// 
// Path: src/main/java/j8spec/J8Spec.java
// public static synchronized void beforeEach(UnsafeBlock block) {
//     isValidContext("beforeEach");
//     contexts.get().current().addBeforeEach(block);
// }
// 
// Path: src/main/java/j8spec/J8Spec.java
// public static synchronized void it(String description, UnsafeBlock block) {
//     it(description, identity(), block);
// }
// 
// Path: src/main/java/j8spec/J8Spec.java
// public static synchronized List<Example> read(Class<?> specClass) {
//     contexts.set(new ExampleGroupContext());
//     try {
//         ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get());
// 
//         exampleGroupDefinition.accept(new DuplicatedBlockValidator());
// 
//         BlockExecutionStrategySelector strategySelector = new BlockExecutionStrategySelector();
//         exampleGroupDefinition.accept(strategySelector);
// 
//         ExampleBuilder exampleBuilder = new ExampleBuilder(strategySelector.strategy());
//         exampleGroupDefinition.accept(exampleBuilder);
// 
//         return exampleBuilder.build();
//     } finally {
//         contexts.set(null);
//     }
// }


import j8spec.annotation.RandomOrder;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static j8spec.J8Spec.beforeAll;
import static j8spec.J8Spec.beforeEach;
import static j8spec.J8Spec.it;
import static j8spec.J8Spec.read;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertThat;
package j8spec;




public class J8SpecFlowRandomOrderTest {

    static class RandomAsDefaultOrderSpec {{
        it("block 1", () -> log.add("block 1"));
        it("block 2", () -> log.add("block 2"));
        it("block 3", () -> log.add("block 3"));
        it("block 4", () -> log.add("block 4"));
        it("block 5", () -> log.add("block 5"));
        it("block 6", () -> log.add("block 6"));
        it("block 7", () -> log.add("block 7"));
        it("block 8", () -> log.add("block 8"));
        it("block 9", () -> log.add("block 9"));
    }}

    @RandomOrder(seed = 0)
    static class SingleExampleGroupWithRandomOrderSpec {{
// Path: src/main/java/j8spec/J8Spec.java
// public static synchronized void beforeAll(UnsafeBlock block) {
//     isValidContext("beforeAll");
//     contexts.get().current().addBeforeAll(block);
// }
// 
// Path: src/main/java/j8spec/J8Spec.java
// public static synchronized void beforeEach(UnsafeBlock block) {
//     isValidContext("beforeEach");
//     contexts.get().current().addBeforeEach(block);
// }
// 
// Path: src/main/java/j8spec/J8Spec.java
// public static synchronized void it(String description, UnsafeBlock block) {
//     it(description, identity(), block);
// }
// 
// Path: src/main/java/j8spec/J8Spec.java
// public static synchronized List<Example> read(Class<?> specClass) {
//     contexts.set(new ExampleGroupContext());
//     try {
//         ExampleGroupDefinition exampleGroupDefinition = newExampleGroupDefinition(specClass, contexts.get());
// 
//         exampleGroupDefinition.accept(new DuplicatedBlockValidator());
// 
//         BlockExecutionStrategySelector strategySelector = new BlockExecutionStrategySelector();
//         exampleGroupDefinition.accept(strategySelector);
// 
//         ExampleBuilder exampleBuilder = new ExampleBuilder(strategySelector.strategy());
//         exampleGroupDefinition.accept(exampleBuilder);
// 
//         return exampleBuilder.build();
//     } finally {
//         contexts.set(null);
//     }
// }


// Path: src/test/java/j8spec/J8SpecFlowRandomOrderTest.java
import j8spec.annotation.RandomOrder;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static j8spec.J8Spec.beforeAll;
import static j8spec.J8Spec.beforeEach;
import static j8spec.J8Spec.it;
import static j8spec.J8Spec.read;
import static java.util.Arrays.asList;
import static java.util.Collections.unmodifiableList;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertThat;

package j8spec;




public class J8SpecFlowRandomOrderTest {

    static class RandomAsDefaultOrderSpec {{
        it("block 1", () -> log.add("block 1"));
        it("block 2", () -> log.add("block 2"));
        it("block 3", () -> log.add("block 3"));
        it("block 4", () -> log.add("block 4"));
        it("block 5", () -> log.add("block 5"));
        it("block 6", () -> log.add("block 6"));
        it("block 7", () -> log.add("block 7"));
        it("block 8", () -> log.add("block 8"));
        it("block 9", () -> log.add("block 9"));
    }}

    @RandomOrder(seed = 0)
    static class SingleExampleGroupWithRandomOrderSpec {{
        beforeAll(() -> log.add("before all 1"));