def METHOD_NAME(self):
    tempdir = tempfile.mkdtemp()
    try:
        the_path = os.sep.join([tempdir, "opt_var_test.json"])
        self.vars.to_json(the_path)
        new_vars = TestOptVariablesOptVariables.from_json(the_path)
        assert new_vars.as_dict() == self.vars.as_dict()
    finally:
        shutil.rmtree(tempdir)