test for spy