Added mock method support to if_object_exists