Add support for spy objects