def METHOD_NAME(
    app, client, librarian_martigny,
    acq_order_fiction_martigny,
    acq_order_line_fiction_martigny,
    acq_order_line2_fiction_martigny
):
    """Test order notification preview API."""
    login_user_via_session(client, librarian_martigny.user)
    acor = acq_order_fiction_martigny
    url = url_for('api_order.order_notification_preview', order_pid=acor.pid)
    res = client.get(url)
    assert res.status_code == 200
    data = res.json
    assert 'recipient_suggestions' in data and 'preview' in data
    assert 'message' not in data
    # update the vendor communication_language to force it to an unknown
    # related template and retry.
    with mock.patch.object(VendorAcquisitionNotificationDumper, 'dump',
                           mock.MagicMock(return_value={
                               'name': 'test vendor name',
                               'email': 'test@vendor.com',
                               'language': 'dummy'
                           })):
        response = client.get(url)
        assert response.status_code == 200
        assert all(field in response.json
                   for field in ['recipient_suggestions', 'preview'])