def METHOD_NAME(connection_init):
    stream = "people"
    data = {"name": "John Doe", "email": "john.doe@example.com"}
    channel = _init_mocks(connection_init=connection_init)
    input_messages = [_record(stream=stream, data=data), _state()]
    destination = DestinationRabbitmq()
    for m in destination.write(config=config, configured_catalog=_configured_catalog(), input_messages=input_messages):
        assert m.type == Type.STATE
    _, _, args = channel.basic_publish.mock_calls[0]
    assert args["exchange"] == "test_exchange"
    assert args["routing_key"] == "test_routing_key"
    assert args["properties"].content_type == "application/json"
    assert args["properties"].headers["stream"] == stream
    assert json.loads(args["body"]) == data