Operators { @Private static String[] sort(String... names) { String[] copy = names.clone(); Arrays.sort(copy, LONGER_STRING_FIRST); Suites suites = new Suites(); for (String name : copy) { suites.add(name); } return suites.toArray(); }    }
@Test public void testSort() { Asserts.assertArrayEquals(Operators.sort()); Asserts.assertArrayEquals(Operators.sort("="), "="); Asserts.assertArrayEquals(Operators.sort("+", "+=", "+", ""), "+=", "+"); Asserts.assertArrayEquals(Operators.sort("+", "+=", "+++", "-"), "-", "+=", "+++", "+"); Asserts.assertArrayEquals(Operators.sort("+", "+=", "+++", "-", "-="), "-=", "-", "+=", "+++", "+"); }