BlockingObservableNext implements Iterable<T> { @Override public Iterator<T> iterator() { NextObserver<T> nextObserver = new NextObserver<T>(); return new NextIterator<T>(source, nextObserver); } BlockingObservableNext(ObservableSource<T> source); @Override Iterator<T> iterator();  }
@Test public void testSynchronousNext() { assertEquals(1, BehaviorProcessor.createDefault(1).take(1).blockingSingle().intValue()); assertEquals(2, BehaviorProcessor.createDefault(2).blockingIterable().iterator().next().intValue()); assertEquals(3, BehaviorProcessor.createDefault(3).blockingNext().iterator().next().intValue()); }