@Test(expected = FastNoSuchElementException.class)
    public void shouldThrowOnLimitIfIteratorExceeded() {
        final Iterator<Integer> itty = Arrays.asList(1, 2, 3).iterator();
        final Iterator<Integer> limitedItty = IteratorUtils.limit(itty, 1);
        limitedItty.next();
        limitedItty.next();
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/util/iterator/IteratorUtilsTest.java