### Question:
CsvFile { public static CsvFile of(CharSource source, boolean headerRow) { return of(source, headerRow, ','); } private  CsvFile(
      ImmutableList<String> headers,
      ImmutableMap<String, Integer> searchHeaders,
      ImmutableList<CsvRow> rows); static CsvFile of(CharSource source, boolean headerRow); static CsvFile of(CharSource source, boolean headerRow, char separator); static CsvFile of(Reader reader, boolean headerRow); static CsvFile of(Reader reader, boolean headerRow, char separator); static char findSeparator(CharSource source); static CsvFile of(List<String> headers, List<? extends List<String>> rows); ImmutableList<String> headers(); ImmutableList<CsvRow> rows(); int rowCount(); CsvRow row(int index); boolean containsHeader(String header); boolean containsHeaders(Collection<String> headers); boolean containsHeader(Pattern headerPattern); CsvFile withHeaders(List<String> headers); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_of_ioException() { assertThatExceptionOfType(UncheckedIOException.class) .isThrownBy(() -> CsvFile.of(Files.asCharSource(new File("src/test/resources"), StandardCharsets.UTF_8), false)); }
@Test public void test_of_empty_with_header() { assertThatIllegalArgumentException().isThrownBy(() -> CsvFile.of(CharSource.wrap(""), true)); }
@Test public void test_of_lists_sizeMismatch() { List<String> headers = Arrays.asList("1", "2"); List<List<String>> rows = Arrays.asList(Arrays.asList("a", "x"), Arrays.asList("b")); assertThatIllegalArgumentException().isThrownBy(() -> CsvFile.of(headers, rows)); }