### Question:
CsvIterator implements AutoCloseable, PeekingIterator<CsvRow> { public static CsvIterator of(CharSource source, boolean headerRow) { return of(source, headerRow, ','); } private  CsvIterator(
      BufferedReader reader,
      char separator,
      ImmutableList<String> headers,
      ImmutableMap<String, Integer> searchHeaders,
      int currentLineNumber); static CsvIterator of(CharSource source, boolean headerRow); static CsvIterator of(CharSource source, boolean headerRow, char separator); static CsvIterator of(Reader reader, boolean headerRow); static CsvIterator of(Reader reader, boolean headerRow, char separator); ImmutableList<String> headers(); boolean containsHeader(String header); boolean containsHeaders(Collection<String> headers); boolean containsHeader(Pattern headerPattern); Iterable<CsvRow> asIterable(); Stream<CsvRow> asStream(); @Override boolean hasNext(); @Override CsvRow peek(); @Override CsvRow next(); List<CsvRow> nextBatch(int count); List<CsvRow> nextBatch(Predicate<CsvRow> selector); @Override void remove(); @Override void close(); @Override String toString();  }### Answer:
@Test public void test_of_ioException() { assertThatExceptionOfType(UncheckedIOException.class).isThrownBy( () -> CsvIterator.of(Files.asCharSource(new File("src/test/resources"), StandardCharsets.UTF_8), false)); }
@Test public void test_of_empty_with_header() { assertThatIllegalArgumentException().isThrownBy(() -> CsvIterator.of(CharSource.wrap(""), true)); }