@Test
public void testFlatMapOption() {

    final AFunction1NoThrow<String, AOption<String>> uppercaseFirst = new AFunction1NoThrow<String, AOption<String>>() {
        @Override public AOption<String> apply(String param) {
            if(Character.isUpperCase(param.charAt(0)))
                return AOption.some(param.substring(0, 1));
            return AOption.none ();
        }
    };
    assertEquals(Arrays.<String>asList(), ACollectionHelper.flatMap(Arrays.<String>asList(), uppercaseFirst));
    assertEquals(Arrays.asList("A"), ACollectionHelper.flatMap(Arrays.asList("Asdf"), uppercaseFirst));
    assertEquals(Arrays.asList("A", "Q"), ACollectionHelper.flatMap(Arrays.asList("xyz", "Asdf", "Qzd", "rLS"), uppercaseFirst));
}