Added test for iterating with copy algorithm