@Test
public void consumerTransformerShouldPropagateCompletion() throws Exception {

  AssertableSubscriber<Object> subscriber =
      upstream.compose(Transformers.fromConsumer(consumer, scheduler)).test();
  upstream.onNext("hi");
  upstream.onCompleted();
  scheduler.triggerActions();
  subscriber.awaitTerminalEvent(1, TimeUnit.SECONDS);
  subscriber.assertCompleted();
}