@Test
public void disposePreventsFurtherEvents() throws Exception {

  PublishSubject<Integer> subject = PublishSubject.create();
  EventSource<Integer> source = RxEventSources.fromObservables(subject);
  RecordingConsumer<Integer> consumer = new RecordingConsumer<>();
  Disposable d = source.subscribe(consumer);
  subject.onNext(1);
  subject.onNext(2);
  d.dispose();
  subject.onNext(3);
  consumer.waitForChange(50);
  consumer.assertValues(1, 2);
}