adding a new test and fixing up the spy usage