@Test
public void testInjectConfigurations_exceptionOnConflict() throws Exception {

	File karafEtc = this.folder.newFolder();
	File injectionDir = new File( karafEtc, AgentUtils.INJECTED_CONFIGS_DIR );
	Assert.assertTrue( injectionDir.mkdirs());
	File conflict = new File( karafEtc, "valid1.cfg" );
	Assert.assertTrue( conflict.mkdir());
	Utils.writeStringInto( "ip = <ip-address>\napp = <application-name>\n", new File( injectionDir, "valid1.cfg.tpl" ));
	// Check
	Assert.assertEquals( 2, karafEtc.listFiles().length );
	AgentUtils.injectConfigurations( karafEtc.getAbsolutePath(), "app", "/vm", "default", "127.0.0.1" );
	Assert.assertEquals( 2, karafEtc.listFiles().length );
	File f = new File( karafEtc, "valid1.cfg" );
	Assert.assertTrue( f.isDirectory());
}