@Test
public void flatten() {

    ArrayList<String> strings = new ArrayList<>(Arrays.asList("1", "2", "3"));
    List<String> actual = RxOptional
        .maybe(strings)
        .flatten(a -> a)
        .filter(s -> !s.equals("2"))
        .toList()
        .blockingGet();
    assertThat(actual, is(not(strings)));
    assertThat(actual.size(), is(2));
    assertThat(actual.get(0), is("1"));
    assertThat(actual.get(1), is("3"));
}