Made test use of spies a little simpler.