def METHOD_NAME():
    input_variable_name = "input"
    input_variable_value = pd.DataFrame({"A": [1], "B": [2]})
    output_variable_name = "output"
    pandas_df_jsonized = """[{"A":1,"B":2}]"""
    expected_r_code = """
        fileConn<-file("temporary_pandas_df_sparkmagics.txt")
        writeLines('{}', fileConn)
        close(fileConn)
        {} <- read.json("temporary_pandas_df_sparkmagics.txt")
        {}.persist()
        file.remove("temporary_pandas_df_sparkmagics.txt")""".format(
        pandas_df_jsonized, output_variable_name, output_variable_name
    )
    sparkcommand = SendPandasDfToSparkCommand(
        input_variable_name, input_variable_value, output_variable_name, 1
    )
    assert sparkcommand._r_command(
        input_variable_name, input_variable_value, output_variable_name
    ) == Command(expected_r_code)