System.setProperty("test.destdir", destdir.getAbsolutePath());
Resource testResourceConfig = new ClassPathResource(
ClassUtil.getResourceNameForPackage(SpringextContextLoader.class) + "/test-resources.xml");
return new ResourceLoadingXmlApplicationContext(testResourceConfig);
} finally {
System.clearProperty("test.srcdir");
System.clearProperty("test.destdir");
}
}