def METHOD_NAME(
    SPARQLWrapper: MagicMock, os: MagicMock, dispatch_rpc: MagicMock,
    tmp_path: Path
):
    input_file = tmp_path / 'input_file.pkl'
    token_file = tmp_path / 'token.txt'
    output_file = tmp_path / 'output.pkl'
    environ = {'INPUT_FILE': str(input_file),
               'TOKEN_FILE': str(token_file),
               'DATABASE_URI': MOCK_SPARQL_ENDPOINT,
               'OUTPUT_FILE': str(output_file)}
    os.environ = environ
    input_args = {'query': 'select *'}
    with input_file.open('wb') as f:
        pickle.dump(input_args, f)
    with token_file.open('w') as f:
        f.write(TOKEN)
    dispatch_rpc.return_value = pd.DataFrame()
    SPARQLWrapper.return_value.query.return_value.convert.return_value = \
        DATA.encode()
    wrapper.sparql_wrapper(MODULE_NAME)
    dispatch_rpc.assert_called_once()
    target_df = pd.DataFrame([[1, 2]], columns=['column1', 'column2'])
    pd.testing.assert_frame_equal(target_df, dispatch_rpc.call_args[0][0])