P25 { public static <T> List<T> randomPermutation(List<T> list) { return P23.randomSelectR(list, list.size()); }  static List<T> randomPermutation(List<T> list);  }
@Test public void shouldGenerateRandomPermutationOfElementsOfAList() throws Exception { List<String> permutation = P25.randomPermutation(Stream.of("a", "b", "c", "d", "e", "f").collect(toList())); System.out.println(permutation); assertThat(permutation, hasSize(6)); assertThat(permutation, containsInAnyOrder("a", "b", "c", "d", "e", "f")); }