@Test(expected = TestException.class)
public void testMostRecentWithException() {

    Subject<String, String> s = PublishSubject.create();
    Iterator<String> it = mostRecent(s, "default").iterator();
    assertTrue(it.hasNext());
    assertEquals("default", it.next());
    assertEquals("default", it.next());
    s.onError(new TestException());
    assertTrue(it.hasNext());
    it.next();
}