Extract spawning a test in a method