@Test
public void effectPerformerInvokesFunctionWithReceivedEffectAndEmitsReturnedEvents() {

  PublishSubject<String> upstream = PublishSubject.create();
  TestScheduler scheduler = new TestScheduler();
  Function<String, Integer> function = s -> s.length();
  TestObserver<Integer> observer =
      upstream.compose(Transformers.fromFunction(function, scheduler)).test();
  upstream.onNext("Hello");
  scheduler.triggerActions();
  observer.assertValue(5);
}