import com.rigiresearch.examgen.model.ClosedEnded;
import com.rigiresearch.examgen.model.CompoundQuestion;
import com.rigiresearch.examgen.model.CompoundText;
import com.rigiresearch.examgen.model.Examination;
import com.rigiresearch.examgen.model.OpenEnded;
import com.rigiresearch.examgen.model.TextSegment;
import java.util.Arrays;
import java.util.HashMap;

/**
 * Copyright 2017 University of Victoria
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

/**
 * Main program.
 * @author Miguel Jimenez (miguel@uvic.ca)
 * @date 2017-08-12
 * @version $Id$
 * @since 0.0.1
 */
public final class Application {

    @SuppressWarnings("serial")
    public static void main(final String[] args) {
        new Examination(
            new CompoundText(
                Arrays.asList(
                    new TextSegment.Simple("Quiz 1"),
                    new TextSegment.Simple("CSC 111"),
                    new TextSegment.Simple("Fall 2017")
                )
            ),
            new TextSegment.Simple("Quiz 1"),
            new HashMap<String, String>(){{
                put("V Number", "");
                put("Name", "");
                put("Lab Section", "B01");
                put("Grade", "");
            }},
            Arrays.asList(
                new CompoundQuestion(
                    new TextSegment.Simple("This is a group of questions"),
                    Arrays.asList(
                        new ClosedEnded(
                            new TextSegment.Simple("This is a question with options"),
                            Arrays.asList(
                                new ClosedEnded.Option(
                                    true,
                                    new TextSegment.Simple("This is an option")
                                ),
                                new ClosedEnded.Option(
                                    false,
                                    new TextSegment.Simple("This is another option")
                                )
                            )
                        ),
                        new OpenEnded(
                            new TextSegment.Simple("Is this an open question?")
                        )
                    )
                )
            )
        );
    }

}

@@ -1,366 +1,4 @@
-import com.rigiresearch.examgen.model.ClosedEnded;%0Aimport com.rigiresearch.examgen.model.CompoundQuestion;%0Aimport com.rigiresearch.examgen.model.CompoundText;%0Aimport com.rigiresearch.examgen.model.Examination;%0Aimport com.rigiresearch.examgen.model.OpenEnded;%0Aimport com.rigiresearch.examgen.model.TextSegment;%0Aimport java.util.Arrays;%0Aimport java.util.HashMap;%0A%0A
 /**%0A
@@ -1119,16 +1119,377 @@
 ARE.%0A */
+%0Aimport com.rigiresearch.examgen.model.ClosedEnded;%0Aimport com.rigiresearch.examgen.model.CompoundQuestion;%0Aimport com.rigiresearch.examgen.model.CompoundText;%0Aimport com.rigiresearch.examgen.model.Examination;%0Aimport com.rigiresearch.examgen.model.OpenEnded;%0Aimport com.rigiresearch.examgen.model.TextSegment;%0Aimport java.util.Arrays;%0Aimport java.util.HashMap;
 %0A%0A/**%0A *
@@ -1723,24 +1723,83 @@
 s) %7B%0A       
+ final long seed = 1234;%0A        final Examination exam01 =
  new Examina
@@ -3342,32 +3342,32 @@
 )%0A            )%0A
-
         );%0A    %7D
@@ -3361,16 +3361,134 @@
      );%0A
+        final Examination exam02 = exam01.scrambled(seed);%0A        final Examination exam03 = exam02.scrambled(seed);%0A
     %7D%0A%0A%7D

Update sample code