def METHOD_NAME(
        self, mock_run, mock_subproc, mock_conf_set):
    """
        FOO=default in config_vars,
        and snapd db has foo=bar,
        so checkbox.conf should be written with:
        "FOO=bar"
    """
    mock_conf_set.return_value = {'foo': 'default'}
    mock_subproc.side_effect = [
        dedent("""
        {
        \t"foo": "bar"
        }
        """).lstrip().encode(sys.stdout.encoding),
        dedent("""
        {
        \t"foo": "bar"
        }
        """).lstrip().encode(sys.stdout.encoding)
    ]
    m = mock_open()
    with patch('builtins.open', m):
        refresh_configuration()
    m.assert_called_with("$SNAP_DATA/checkbox.conf", "wt")
    m.return_value.write.assert_has_calls([
        call('[environment]\n'),
        call('FOO = bar\n'),
        call('\n')
    ])
    mock_run.assert_called_once_with(['snapctl', 'set', 'conf.foo=bar'])