+ @Test
+ public void testTwoFilesTwoExtensions() throws Exception {
+ File folder = getFolder("twoFiles");
+ tested = instantiatePersisterFromAdapter(folder, Optional.of("xml, xml2"));
+ LOG.info("Testing : {}", tested);
+ assertEquals(2, tested.loadLastConfigs().size());
+ }
+
+ @Test
+ public void testTwoFilesOnlyOneExtension() throws Exception {
+ File folder = getFolder("twoFiles");
+ tested = instantiatePersisterFromAdapter(folder, Optional.of("xml"));
+ LOG.info("Testing : ", tested);
+ List<ConfigSnapshotHolder> results = tested.loadLastConfigs();
+ assertEquals(1, results.size());
+
+ assertResult(results.get(0), "<config>1</config>", "cap1-a", "cap2-a", "capa a-a");
+ }
+
+ @Test
+ public void testTwoFilesOneInvalid() throws Exception {
+ File folder = getFolder("twoFiles_corrupt");
+ tested = instantiatePersisterFromAdapter(folder, Optional.of("xml"));
+ LOG.info("Testing : {}", tested);
+ List<ConfigSnapshotHolder> results = tested.loadLastConfigs();
+ assertEquals(1, results.size());
+
+ assertResult(results.get(0), "<config>1</config>", "cap1-a", "cap2-a", "capa a-a");