@Test
public void testOnErrorInNewThread() {

    Subject<String, String> obs = PublishSubject.create();
    Iterator<String> it = next(obs).iterator();
    fireOnErrorInNewThread(obs);
    try {
        it.hasNext();
        fail("Expected an TestException");
    } catch (TestException e) {
        // successful
    }
    assertErrorAfterObservableFail(it);
}