implement tests for iterator method