update unit test spy for API change