@Test
public void testIterator() {

    int count = TestData.getScaleCount();
    Set<Revision<L, K, V>> revisions = Sets
            .newHashSetWithExpectedSize(count);
    for (int i = 0; i < count; ++i) {
        Revision<L, K, V> revision = null;
        while (revision == null || revisions.contains(revision)) {
            L locator = getLocator();
            K key = getKey();
            V value = getValue();
            long version = Time.now();
            Action type = Action.ADD;
            revision = chunk.makeRevision(locator, key, value, version,
                    type);
        }
        chunk.insert(revision.getLocator(), revision.getKey(),
                revision.getValue(), revision.getVersion(),
                revision.getType());
        revisions.add(revision);
    }
    Folio folio = chunk.serialize();
    FileSystem.writeBytes(folio.bytes(), file.toString());
    chunk.freeze(file);
    chunk = load(file, filter, folio.manifest());
    Iterator<Revision<L, K, V>> it = chunk.iterator();
    Set<Revision<L, K, V>> stored = Sets.newHashSetWithExpectedSize(count);
    while (it.hasNext()) {
        stored.add(it.next());
    }
    Assert.assertEquals(revisions, stored);
}