CollectionUtils { public static <T> boolean sameElts(Collection<T> left, Collection<T> right) { return right.containsAll(left) && left.containsAll(right) ; }  static boolean sameElts(Collection<T> left, Collection<T> right); static T oneElt(Collection<T> collection);  }
@Test public void sameElts_01() { List<String> x1 = Arrays.asList("a", "b", "c") ; List<String> x2 = Arrays.asList("a", "c", "b") ; assertTrue(sameElts(x1, x2)) ; }
@Test public void sameElts_02() { List<String> x1 = Arrays.asList("a", "b", "c", "a") ; List<String> x2 = Arrays.asList("a", "c", "b") ; assertTrue(sameElts(x1, x2)) ; }
@Test public void sameElts_03() { List<String> x1 = Arrays.asList("a", "b", "c") ; List<String> x2 = Arrays.asList("a", "c", "b") ; Set<String> z1 = new HashSet<>(x2) ; assertTrue(sameElts(x1, z1)) ; }
@Test public void sameElts_04() { List<String> x1 = Arrays.asList("a", "b", "X") ; List<String> x2 = Arrays.asList("a", "c", "b") ; assertFalse(sameElts(x1, x2)) ; }
@Test public void sameElts_05() { List<String> x1 = Arrays.asList("a", "b", "c") ; List<String> x2 = Arrays.asList("a", "b") ; assertFalse(sameElts(x1, x2)) ; }
@Test public void sameElts_06() { List<String> x1 = Arrays.asList("a", "b", "X") ; List<String> x2 = Arrays.asList("a", "c", "b") ; Set<String> z1 = new HashSet<>(x2) ; assertFalse(sameElts(x1, z1)) ; }