Add generator and iterator tests