Added test for iteration code