joel-costigliola/assertj-core — pull request #204 by mikosik (2014-05-12 08:16:12+00:00)
Title: simple solution for issue #144 "Introduce IteratorAssert" without introducing IteratorAssert

I believe this patch solves the problem described in https://github.com/joel-costigliola/assertj-core/issues/141 (Introduce IteratorAssert) without actually implementing IteratorAssert which would be a lot of code.

Proposed solution introduces Iterable implementation that consumes Iterator lazily - only when it is requested (in that case by IterableAssert). This way we can reuse IterableAssert in a way that avoids consuming Iterator when it is not needed.