def METHOD_NAME(monkeypatch: MonkeyPatch,
                        signals: ConnectionSignals,
                        value_to_send: Value,
                        has_ctrl_vars: bool,
                        expected_value_to_receive: object,
                        expected_signal_count: int):
    """ Ensure that all our signals are emitted as expected based on the structured data we received from p4p """
    # Set up a mock p4p client
    mock_channel = PyDMChannel()
    monkeypatch.setattr(P4PPlugin, 'context', MockContext())
    monkeypatch.setattr(P4PPlugin.context, 'monitor', lambda **args: None)  # Don't want to actually setup a monitor
    p4p_connection = Connection(mock_channel, 'pva://TEST:ADDRESS')
    received_values = {}
    signals_received = 0
    def receive_signal(value_name: str, value_received: object):
        """ A simple slot for receiving all our test signals and storing the values to ensure they are as expected """
        received_values[value_name] = value_received
        nonlocal signals_received
        signals_received += 1
    expected_value_type = type(value_to_send.value)
    if type(value_to_send.value) == list:
        expected_value_type = np.ndarray
    elif 'NTEnum' in value_to_send.getID():
        expected_value_type = int
    p4p_connection.new_value_signal[expected_value_type].connect(functools.partial(receive_signal, 'value'))
    p4p_connection.lower_alarm_limit_signal.connect(functools.partial(receive_signal, 'low_alarm_limit'))
    p4p_connection.lower_warning_limit_signal.connect(functools.partial(receive_signal, 'low_warning_limit'))
    p4p_connection.upper_alarm_limit_signal.connect(functools.partial(receive_signal, 'high_alarm_limit'))
    p4p_connection.upper_warning_limit_signal.connect(functools.partial(receive_signal, 'high_warning_limit'))
    p4p_connection.new_severity_signal.connect(functools.partial(receive_signal, 'severity'))
    p4p_connection.unit_signal.connect(functools.partial(receive_signal, 'units'))
    p4p_connection.lower_ctrl_limit_signal.connect(functools.partial(receive_signal, 'lower_ctrl_limit'))
    p4p_connection.upper_ctrl_limit_signal.connect(functools.partial(receive_signal, 'upper_ctrl_limit'))
    p4p_connection.enum_strings_signal.connect(functools.partial(receive_signal, 'enum_strings'))
    # Send out the initial value for our test PV
    p4p_connection.send_new_value(value_to_send)
    # Confirm all the signals were fired off as expected, and that each value is what we specified
    assert np.array_equal(received_values['value'], expected_value_to_receive)
    if has_ctrl_vars:
        assert received_values['low_alarm_limit'] == 2
        assert received_values['low_warning_limit'] == 3
        assert received_values['high_warning_limit'] == 8
        assert received_values['high_alarm_limit'] == 10
        assert received_values['severity'] == 0
        assert received_values['units'] == 'mV'
        assert received_values['lower_ctrl_limit'] == 1
        assert received_values['upper_ctrl_limit'] == 11
        assert signals_received == expected_signal_count
    else:
        assert signals_received == expected_signal_count
    # Now make just a couple changes to our value, and send it again
    if has_ctrl_vars:
        value_to_send.value = 9
        value_to_send.alarm.severity = 1
        p4p_connection.send_new_value(value_to_send)
        # Verify that the two values did update, and that the other 7 signals did not send
        assert received_values['value'] == 9
        assert received_values['severity'] == 1
        assert signals_received == 11