testing with spies