def METHOD_NAME(self, mocker):
    """Test that the return type of the observable is :attr:`ObservableReturnTypes.Expectation`"""
    dev = qml.device("default.qubit.legacy", wires=2)
    @qml.qnode(dev)
    def circuit():
        res = qml.expval(qml.PauliZ(0))
        assert res.return_type is Expectation
        return res
    new_dev = circuit.device
    spy = mocker.spy(qml.QubitDevice, "expval")
    circuit()
    custom_measurement_process(new_dev, spy)