fyi - IIRC we tackled this problem slightly differently in the ADF Faces codebase.
In an effort to fully isolate anything that might be keyed by ContextClassLoader (including FactoryFinder internal state), we created a trivial wrapper ClassLoader to provide a unique ContextClassLoader in setUp() and restore it back to the original in tearDown().
That is a *really* good idea ... I'll be adding it to Shale's test framework tonight. I don't see it as mutually exclusive with any of the other cleanups we are doing to ensure that different tests do not interfere with each other.
Kind Regards,
John Fallows.
Craig
