@Test public void testEndThrows() throws Exception { final StreamCollectHelper<Object, Object> helper = new StreamCollectHelper<Object, Object>(caller, 1, consumer, supplier, target); when(supplier.get()).thenThrow(e); helper.completed(result); verify(target).fail(any(Exception.class)); }
@Override public void completed(S result) { successful.incrementAndGet(); caller.execute(() -> consumer.accept(result)); check(); }
StreamCollectHelper implements Handle<S> { @Override public void completed(S result) { successful.incrementAndGet(); caller.execute(() -> consumer.accept(result)); check(); } }
StreamCollectHelper implements Handle<S> { @Override public void completed(S result) { successful.incrementAndGet(); caller.execute(() -> consumer.accept(result)); check(); } StreamCollectHelper(
      final Caller caller, final int size, final Consumer<S> consumer, final Supplier<T> supplier,
      final Completable<? super T> target
  ); }
StreamCollectHelper implements Handle<S> { @Override public void completed(S result) { successful.incrementAndGet(); caller.execute(() -> consumer.accept(result)); check(); } StreamCollectHelper(
      final Caller caller, final int size, final Consumer<S> consumer, final Supplier<T> supplier,
      final Completable<? super T> target
  ); @Override void failed(Throwable e); @Override void completed(S result); @Override void cancelled(); }
StreamCollectHelper implements Handle<S> { @Override public void completed(S result) { successful.incrementAndGet(); caller.execute(() -> consumer.accept(result)); check(); } StreamCollectHelper(
      final Caller caller, final int size, final Consumer<S> consumer, final Supplier<T> supplier,
      final Completable<? super T> target
  ); @Override void failed(Throwable e); @Override void completed(S result); @Override void cancelled();  }