@Test public void testStream_generateFailure() {

  Maybe<String, MyException> maybe =
      Stream.generate(() -> Maybe.maybe(() -> raise("bad"))).findFirst().get();
  assertThat(assertThrows(MyException.class, maybe::orElseThrow).getMessage()).isEqualTo("bad");
}