added spy unit test