@Override
    public <R> R eval(Mode mode, String luaScript, ReturnType returnType) {
        return eval(mode, luaScript, returnType, Collections.emptyList());
    }
@Test
    public void testCommandMapping() {
        String script = "local value = redis.call('cmd1', KEYS[1], ARGV[1]); "
                + "if value ~= false then "
                    + "redis.call('cmd2', KEYS[1], ARGV[1], ARGV[2]); "
                    + "redis.call('cmd2', KEYS[1], ARGV[1], ARGV[2]); "
                    + "return value; "
                + "end; "
                + "return nil; ";

        Config cfg = createConfig();
        cfg.useSingleServer().setCommandMapper(new CommandMapper() {
            @Override
            public String map(String name) {
                if (name.equalsIgnoreCase("cmd1")) {
                    return "hget";
                }
                if (name.equalsIgnoreCase("cmd2")) {
                    return "hset";
                }
                return name;
            }
        });

        RedissonClient r = Redisson.create(cfg);
        RMap<Object, Object> m = r.getMap("test");
        m.fastPut("key1", "value");

        String res = r.getScript().eval(Mode.READ_WRITE,
                script,
                RScript.ReturnType.VALUE, Arrays.asList("test"), "key1", "value3");
        assertThat(res).isEqualTo("value");

        assertThat(m.get("key1")).isEqualTo("value3");
    }