### Question:
Permutation { public static <T> List<List<T>> recursivePermutateNoDup(T[] array) { List<List<T>> list = new ArrayList<>(); recursivePermutateNoDup(array, 0, list); return list; }  static List<List<T>> insertPermutateNoDup(T[] array); static List<List<T>> recursivePermutateNoDup(T[] array); static void recursivePermutateNoDup(T[] array, int start, List<List<T>> cache); static List<List<T>> permuteDup(T[] array); List<List<String>> allChoices(List<String[]> categories);  }### Answer:
@Test public void testRecursivePermutateNoDup() { Integer[] array = new Integer[]{1, 2, 3}; List<List<Integer>> result = Permutation.recursivePermutateNoDup(array); TestUtilities.assertEquals(result, Arrays.asList(Arrays.asList(1, 2, 3), Arrays.asList(1, 3, 2), Arrays.asList(2, 1, 3), Arrays.asList(2, 3, 1), Arrays.asList(3, 2, 1), Arrays.asList(3, 1, 2))); }