@Override
    public Long del(byte[]... keys) {
        if (isQueueing() || isPipelined()) {
            for (byte[] key: keys) {
                write(key, LongCodec.INSTANCE, RedisCommands.DEL, key);
            }

            return null;
        }

        CommandBatchService es = new CommandBatchService(executorService);
        for (byte[] key: keys) {
            es.writeAsync(key, LongCodec.INSTANCE, RedisCommands.DEL, key);
        }
        BatchResult<Long> b = (BatchResult<Long>) es.execute();
        return b.getResponses().stream().collect(Collectors.summarizingLong(v -> v)).getSum();
    }
@Test
    public void testDel() {
        List<byte[]> keys = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            byte[] key = ("test" + i).getBytes();
            keys.add(key);
            connection.set(key, ("test" + i).getBytes());
        }
        assertThat(connection.del(keys.toArray(new byte[0][]))).isEqualTo(10);
    }