### Question:
IniFile { public static IniFile of(CharSource source) { ArgChecker.notNull(source, "source"); ImmutableList<String> lines = Unchecked.wrap(() -> source.readLines()); ImmutableMap<String, ImmutableListMultimap<String, String>> parsedIni = parse(lines); ImmutableMap.Builder<String, PropertySet> builder = ImmutableMap.builder(); parsedIni.forEach((sectionName, sectionData) -> builder.put(sectionName, PropertySet.of(sectionData))); return new IniFile(builder.build()); } private  IniFile(ImmutableMap<String, PropertySet> sectionMap); static IniFile of(CharSource source); static IniFile of(Map<String, PropertySet> sectionMap); ImmutableSet<String> sections(); ImmutableMap<String, PropertySet> asMap(); boolean contains(String name); PropertySet section(String name); Optional<PropertySet> findSection(String name); IniFile combinedWith(IniFile other); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_of_invalid_propertyAtStart() { String invalid = "a = x\n"; assertThatIllegalArgumentException().isThrownBy(() -> IniFile.of(CharSource.wrap(invalid))); }
@Test public void test_of_invalid_badSection() { String invalid = "" + "[section\n" + "b\n"; assertThatIllegalArgumentException().isThrownBy(() -> IniFile.of(CharSource.wrap(invalid))); }
@Test public void test_of_invalid_duplicateSection() { String invalid = "" + "[section]\n" + "a = y\n" + "[section]\n" + "b = y\n"; assertThatIllegalArgumentException().isThrownBy(() -> IniFile.of(CharSource.wrap(invalid))); }
@Test public void test_of_invalid_emptyKey() { String invalid = "" + "[section]\n" + "= y\n"; assertThatIllegalArgumentException().isThrownBy(() -> IniFile.of(CharSource.wrap(invalid))); }
@Test public void test_of_ioException() { assertThatExceptionOfType(UncheckedIOException.class).isThrownBy( () -> IniFile.of(Files.asCharSource(new File("src/test/resources"), StandardCharsets.UTF_8))); }