def METHOD_NAME(params: Params, caplog, general_data_fixture, monkeypatch):
    # setup
    c = Counter(0)
    c.data.set.reserved_surplus = params.reserved_surplus
    cp = Chargepoint(0, None)
    ev = Ev(0)
    ev.data.control_parameter.phases = 1
    ev.data.control_parameter.state = params.state
    ev.data.control_parameter.timestamp_switch_on_off = params.timestamp_switch_on_off
    ev.data.charge_template = ChargeTemplate(0)
    ev.data.charge_template.data.chargemode.pv_charging.feed_in_limit = params.feed_in_limit
    cp.data.set.charging_ev_data = ev
    mock_calc_switch_on_power = Mock(return_value=[params.surplus, params.threshold])
    monkeypatch.setattr(Counter, "calc_switch_on_power", mock_calc_switch_on_power)
    # execution
    c.switch_on_threshold_reached(cp)
    # evaluation
    assert c.data.set.reserved_surplus == params.expected_reserved_surplus
    assert params.expected_msg is None or params.expected_msg in caplog.text
    assert (cp.data.set.charging_ev_data.data.control_parameter.timestamp_switch_on_off ==
            params.expected_timestamp_switch_on_off)