public void testFailingIteratorFails() { Exception ex = new Exception("for testing"); ExceptionalIterator<?, Exception> failing = ExceptionalIterator.Failing.create(ex); try { failing.hasNext(); fail("Expected an exception"); } catch (Exception e) { assertSame(ex, e); } }
public void testFailingIteratorFails() { Exception ex = new Exception("for testing"); ExceptionalIterator<?, Exception> failing = ExceptionalIterator.Failing.create(ex); try { failing.hasNext(); fail("Expected an exception"); } catch (Exception e) { assertSame(ex, e); } }