//The line above should throw an error
@Test
	public void testBlowingUpWithDuplicateLoaders() {
		KeyValuePairLoader kvpl = new KeyValuePairLoader();
		kvpl.setKeyValuePairs(cmdLineArgsWFullClassName);
		try {
			AndHowConfiguration config = AndHowTestConfig.instance()
				.setLoaders(kvpl, kvpl)
				.addOverrideGroups(configPtGroups);
			AndHow.setConfig(config);
			AndHow.instance();
			fail();	//The line above should throw an error
		} catch (AppFatalException ce) {
			assertEquals(1, ce.getProblems().filter(ConstructionProblem.class).size());
			assertTrue(ce.getProblems().filter(ConstructionProblem.class).get(0) instanceof ConstructionProblem.DuplicateLoader);
			ConstructionProblem.DuplicateLoader dl = (ConstructionProblem.DuplicateLoader)ce.getProblems().filter(ConstructionProblem.class).get(0);
			assertEquals(kvpl, dl.getLoader());
			assertTrue(ce.getSampleDirectory().length() > 0);
			File sampleDir = new File(ce.getSampleDirectory());
			assertTrue(sampleDir.exists());
			assertTrue(sampleDir.listFiles().length > 0);
		}
	}
AndHow.setConfig(config);
AndHow.instance();
fail(); //The line above should throw an error
} catch (AppFatalException ce) {
assertEquals(1, ce.getProblems().filter(ConstructionProblem.class).size());
@Test
public void testBlowingUpWithDuplicateLoaders() {
KeyValuePairLoader kvpl = new KeyValuePairLoader();
kvpl.setKeyValuePairs(cmdLineArgsWFullClassName);
try {
AndHowConfiguration config = AndHowTestConfig.instance()
.setLoaders(kvpl, kvpl)
.addOverrideGroups(configPtGroups);
AndHow.setConfig(config);
AndHow.instance();
fail(); //The line above should throw an error
} catch (AppFatalException ce) {
assertEquals(1, ce.getProblems().filter(ConstructionProblem.class).size());
assertTrue(ce.getProblems().filter(ConstructionProblem.class).get(0) instanceof ConstructionProblem.DuplicateLoader);
ConstructionProblem.DuplicateLoader dl = (ConstructionProblem.DuplicateLoader)ce.getProblems().filter(ConstructionProblem.class).get(0);
assertEquals(kvpl, dl.getLoader());
assertTrue(ce.getSampleDirectory().length() > 0);
File sampleDir = new File(ce.getSampleDirectory());
assertTrue(sampleDir.exists());
assertTrue(sampleDir.listFiles().length > 0);
}
@Test
public void testBlowingUpWithDuplicateLoaders() {
KeyValuePairLoader kvpl = new KeyValuePairLoader();
kvpl.setKeyValuePairs(cmdLineArgsWFullClassName);
try {
AndHowConfiguration config = AndHowTestConfig.instance()
.setLoaders(kvpl, kvpl)
.addOverrideGroups(configPtGroups);
AndHow.setConfig(config);
AndHow.instance();
fail(); //The line above should throw an error
} catch (AppFatalException ce) {
assertEquals(1, ce.getProblems().filter(ConstructionProblem.class).size());
assertTrue(ce.getProblems().filter(ConstructionProblem.class).get(0) instanceof ConstructionProblem.DuplicateLoader);
ConstructionProblem.DuplicateLoader dl = (ConstructionProblem.DuplicateLoader)ce.getProblems().filter(ConstructionProblem.class).get(0);
assertEquals(kvpl, dl.getLoader());
assertTrue(ce.getSampleDirectory().length() > 0);
File sampleDir = new File(ce.getSampleDirectory());
assertTrue(sampleDir.exists());
assertTrue(sampleDir.listFiles().length > 0);
}
}