@Test
public void shouldIterateThroughAllGroups() {

    KeePassFile keePassFile = createTreeStructure();
    GroupZipper zipper = new GroupZipper(keePassFile);
    Iterator<Group> iter = zipper.iterator();
    List<Group> visitedGroups = new ArrayList<Group>();
    while (iter.hasNext()) {
        Group group = iter.next();
        visitedGroups.add(group);
    }
    Assert.assertEquals(6, visitedGroups.size());
}