def METHOD_NAME(etcd_client_mock, instance):
    """
    Test if it set a key in etcd, by direct path
    """
    with patch.dict(etcd_mod.__utils__, {"etcd_util.get_conn": etcd_client_mock}):
        instance.set.return_value = "stack"
        assert etcd_mod.set_("salt", "stack") == "stack"
        instance.set.assert_called_with("salt", "stack", directory=False, ttl=None)
        instance.set.return_value = True
        assert etcd_mod.set_("salt", "", directory=True) is True
        instance.set.assert_called_with("salt", "", directory=True, ttl=None)
        assert etcd_mod.set_("salt", "", directory=True, ttl=5) is True
        instance.set.assert_called_with("salt", "", directory=True, ttl=5)
        assert etcd_mod.set_("salt", "", None, 10, True) is True
        instance.set.assert_called_with("salt", "", directory=True, ttl=10)
        instance.set.side_effect = Exception
        pytest.raises(Exception, etcd_mod.set_, "err", "stack")