@Test
public void testGroupByEquals() {

    final AFunction1NoThrow<String, Integer> len = new AFunction1NoThrow<String, Integer>() {
        @Override public Integer apply(String param) {
            return param.length();
        }
    };
    final Map<Integer, List<String>> grouped = ACollectionHelper.groupBy(Arrays.asList("a", "bc", "d", "efg", "hi", "j"), len);
    assertEquals(3, grouped.size ());
    assertEquals(Arrays.asList("a", "d", "j"), grouped.get (1));
    assertEquals(Arrays.asList("bc", "hi"), grouped.get (2));
    assertEquals(Arrays.asList("efg"), grouped.get (3));
}