@Test
public void testToIterator() {

    Observable<String> obs = Observable.from("one", "two", "three");
    Iterator<String> it = toIterator(obs);
    assertEquals(true, it.hasNext());
    assertEquals("one", it.next());
    assertEquals(true, it.hasNext());
    assertEquals("two", it.next());
    assertEquals(true, it.hasNext());
    assertEquals("three", it.next());
    assertEquals(false, it.hasNext());
}