@Test( expected = IOException.class )
public void testInstanceResources_exception_rootDir() throws Exception {

	// The directory where we should write is an existing file.
	// Prepare our resources
	TestApplicationTemplate app = new TestApplicationTemplate();
	File dir = InstanceHelpers.findInstanceDirectoryOnAgent( app.getTomcat());
	Utils.deleteFilesRecursively( dir );
	Assert.assertFalse( dir.exists());
	Assert.assertTrue( dir.createNewFile());
	Assert.assertTrue( dir.exists());
	// Save our resources
	try {
		AgentUtils.copyInstanceResources( app.getTomcat(), null );
	} finally {
		Utils.deleteFilesRecursively( dir );
	}
}