def METHOD_NAME(make_torch_flow, mocker, endpoint):
    from clip_client.client import Client
    c = Client(server=f'grpc://0.0.0.0:{make_torch_flow.port}')
    on_done_mock = mocker.Mock()
    on_error_mock = mocker.Mock()
    on_always_mock = mocker.Mock()
    r = getattr(c, endpoint)(
        DocumentArray(
            [Document(text='hello', matches=DocumentArray([Document(text='jina')]))]
        ),
        on_done=on_done_mock,
        on_error=on_error_mock,
        on_always=on_always_mock,
    )
    assert r is None
    on_done_mock.assert_called_once()
    on_error_mock.assert_not_called()
    on_always_mock.assert_called_once()