@Override
    public Boolean mSet(Map<byte[], byte[]> tuple) {
        if (isQueueing() || isPipelined()) {
            for (Entry<byte[], byte[]> entry: tuple.entrySet()) {
                write(entry.getKey(), StringCodec.INSTANCE, RedisCommands.SET, entry.getKey(), entry.getValue());
            }
            return true;
        }

        CommandBatchService es = new CommandBatchService(executorService);
        for (Entry<byte[], byte[]> entry: tuple.entrySet()) {
            es.writeAsync(entry.getKey(), StringCodec.INSTANCE, RedisCommands.SET, entry.getKey(), entry.getValue());
        }
        es.execute();
        return true;
    }
@Test
    public void testMSet() {
        Map<byte[], byte[]> map = new HashMap<>();
        for (int i = 0; i < 10; i++) {
            map.put(("test" + i).getBytes(), ("test" + i*100).getBytes());
        }
        connection.mSet(map);
        for (Map.Entry<byte[], byte[]> entry : map.entrySet()) {
            assertThat(connection.get(entry.getKey())).isEqualTo(entry.getValue());
        }
    }