### Question:
ResourceConfig { public static IniFile combinedIniFile(String resourceName) { ArgChecker.notNull(resourceName, "resourceName"); return ResourceConfig.combinedIniFile(ResourceConfig.orderedResources(resourceName)); } private  ResourceConfig(); static IniFile combinedIniFile(String resourceName); static IniFile combinedIniFile(List<ResourceLocator> resources); static List<ResourceLocator> orderedResources(String resourceName); static final String RESOURCE_DIRS_PROPERTY; }### Answer:
@Test public void test_ofChained_chainNextFileTrue() { IniFile test = ResourceConfig.combinedIniFile("TestChain1.ini"); Multimap<String, String> keyValues1 = ImmutableListMultimap.of("a", "z", "b", "y"); Multimap<String, String> keyValues2 = ImmutableListMultimap.of("m", "n"); assertThat(test.asMap()) .hasSize(2) .containsEntry("one", PropertySet.of(keyValues1)) .containsEntry("two", PropertySet.of(keyValues2)); }
@Test public void test_ofChained_chainNextFileFalse() { IniFile test = ResourceConfig.combinedIniFile("TestChain2.ini"); Multimap<String, String> keyValues1 = ImmutableListMultimap.of("a", "z"); Multimap<String, String> keyValues2 = ImmutableListMultimap.of("m", "n"); assertThat(test.asMap()) .hasSize(2) .containsEntry("one", PropertySet.of(keyValues1)) .containsEntry("two", PropertySet.of(keyValues2)); }
@Test public void test_ofChained_chainToNowhere() { IniFile test = ResourceConfig.combinedIniFile("TestChain3.ini"); Multimap<String, String> keyValues1 = ImmutableListMultimap.of("a", "x", "b", "y"); assertThat(test.asMap()).isEqualTo(ImmutableMap.of("one", PropertySet.of(keyValues1))); }
@Test public void test_ofChained_autoChain() { IniFile test = ResourceConfig.combinedIniFile("TestChain4.ini"); Multimap<String, String> keyValues1 = ImmutableListMultimap.of("a", "z", "b", "y"); Multimap<String, String> keyValues2 = ImmutableListMultimap.of("m", "n"); assertThat(test.asMap()) .hasSize(2) .containsEntry("one", PropertySet.of(keyValues1)) .containsEntry("two", PropertySet.of(keyValues2)); }
@Test public void test_ofChained_chainRemoveSections() { IniFile test = ResourceConfig.combinedIniFile("TestChain5.ini"); Multimap<String, String> keyValues1 = ImmutableListMultimap.of("a", "a"); Multimap<String, String> keyValues2 = ImmutableListMultimap.of("m", "n", "o", "z"); assertThat(test.asMap()) .hasSize(2) .containsEntry("one", PropertySet.of(keyValues1)) .containsEntry("two", PropertySet.of(keyValues2)); }