@Test public void immediateComposeThrows() throws Exception { doThrow(cause).when(composeFn).apply(from); assertThat(base.thenComposeCompleted(composeFn, from), is(new ImmediateFailed<>(caller, cause))); }
<U> Stage<U> thenComposeCompleted( final Function<? super T, ? extends Stage<U>> fn, final T value ) { try { return fn.apply(value); } catch (final Exception e) { return new ImmediateFailed<>(caller, e); } }
AbstractImmediate implements Stage<T> { <U> Stage<U> thenComposeCompleted( final Function<? super T, ? extends Stage<U>> fn, final T value ) { try { return fn.apply(value); } catch (final Exception e) { return new ImmediateFailed<>(caller, e); } } }
AbstractImmediate implements Stage<T> { <U> Stage<U> thenComposeCompleted( final Function<? super T, ? extends Stage<U>> fn, final T value ) { try { return fn.apply(value); } catch (final Exception e) { return new ImmediateFailed<>(caller, e); } }  }
AbstractImmediate implements Stage<T> { <U> Stage<U> thenComposeCompleted( final Function<? super T, ? extends Stage<U>> fn, final T value ) { try { return fn.apply(value); } catch (final Exception e) { return new ImmediateFailed<>(caller, e); } }   }
AbstractImmediate implements Stage<T> { <U> Stage<U> thenComposeCompleted( final Function<? super T, ? extends Stage<U>> fn, final T value ) { try { return fn.apply(value); } catch (final Exception e) { return new ImmediateFailed<>(caller, e); } }    }