File tmpDir = new File(getTmpDir(), "validatorTest");
File configDir = new File(tmpDir, srcDir.getName());
org.archive.util.FileUtils.ensureWriteableDirectory(configDir);
FileUtils.copyDirectory(srcDir, configDir);
PathSharingContext ac = null;
try {
File config = new File(configDir,"profile-crawler-beans.cxml");
ac = new PathSharingContext("file:"+config.getAbsolutePath());
} catch (BeansException be){
be.printStackTrace(System.err);
} finally {
assertNotNull("profile not buildable",ac);
ac.validate();
assertEquals("did not get the expected one error",1,ac.getAllErrors().size());
ac.destroy();
}
}