a method can be spied on and can check if it was called