You should make a fresh ClassLoader to guarantee that it's going to be different from the current contextClassLoader. See HttpExecutionContextSpec.scala or ThreadsSpec.scala.