@@ -0,0 +1,2434 @@
+/*%0A * Copyright (c) 2018. Real Time Genomics Limited.%0A *%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions are%0A * met:%0A *%0A * 1. Redistributions of source code must retain the above copyright%0A *    notice, this list of conditions and the following disclaimer.%0A *%0A * 2. Redistributions in binary form must reproduce the above copyright%0A *    notice, this list of conditions and the following disclaimer in the%0A *    documentation and/or other materials provided with the%0A *    distribution.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage com.rtg.util;%0A%0Aimport java.util.Arrays;%0A%0Aimport junit.framework.TestCase;%0A%0Apublic class PermutationTest extends TestCase %7B%0A%0A  public void test3() %7B%0A    final Permutation p = new Permutation(2, 1, 0);%0A    assertEquals(%22%5B0, 1, 2%5D%22, Arrays.toString(p.next()));%0A    assertEquals(%22%5B0, 2, 1%5D%22, Arrays.toString(p.next()));%0A    assertEquals(%22%5B1, 0, 2%5D%22, Arrays.toString(p.next()));%0A    assertEquals(%22%5B1, 2, 0%5D%22, Arrays.toString(p.next()));%0A    assertEquals(%22%5B2, 0, 1%5D%22, Arrays.toString(p.next()));%0A    assertEquals(%22%5B2, 1, 0%5D%22, Arrays.toString(p.next()));%0A    assertNull(p.next());%0A  %7D%0A%0A  public void testAA() %7B%0A    final Permutation p = new Permutation(1, 1);%0A    assertEquals(%22%5B1, 1%5D%22, Arrays.toString(p.next()));%0A    assertNull(p.next());%0A  %7D%0A%0A  public void testAAB() %7B%0A    final Permutation p = new Permutation(1, 2, 1);%0A    assertEquals(%22%5B1, 1, 2%5D%22, Arrays.toString(p.next()));%0A    assertEquals(%22%5B1, 2, 1%5D%22, Arrays.toString(p.next()));%0A    assertEquals(%22%5B2, 1, 1%5D%22, Arrays.toString(p.next()));%0A    assertNull(p.next());%0A  %7D%0A%7D%0A

Add unit test for Permutation