// Path: datagen/src/main/java/io/qala/datagen/RandomShortApi.java
// public static <T> T sample(Collection<T> toSampleFrom) {
//     return from(toSampleFrom).sample();
// }


import org.junit.Test;
import java.util.List;
import static io.qala.datagen.RandomShortApi.sample;
package io.qala.datagen.examples;




@SuppressWarnings("unchecked")
public class _45_ModelBasedTest {
    @Test public void addingMaterials() {
        OrderingTestModel model = new OrderingTestModel();
        model.createExperiment();
        goOverModel(model.allActions(), 10000);
    }

    private static void goOverModel(List<Runnable> actions, int nTimes) {
// Path: datagen/src/main/java/io/qala/datagen/RandomShortApi.java
// public static <T> T sample(Collection<T> toSampleFrom) {
//     return from(toSampleFrom).sample();
// }


// Path: examples/src/test/java/io/qala/datagen/examples/_45_ModelBasedTest.java
import org.junit.Test;
import java.util.List;
import static io.qala.datagen.RandomShortApi.sample;

package io.qala.datagen.examples;




@SuppressWarnings("unchecked")
public class _45_ModelBasedTest {
    @Test public void addingMaterials() {
        OrderingTestModel model = new OrderingTestModel();
        model.createExperiment();
        goOverModel(model.allActions(), 10000);
    }

    private static void goOverModel(List<Runnable> actions, int nTimes) {
        for (int i = 0; i < nTimes; i++) sample(actions).run();