Refactor istream_iterator's unit tests.