@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, StringCodec.INSTANCE, RedisCommands.DEL, key);
        }
        BatchResult<Long> b = (BatchResult<Long>) es.execute();
        return b.getResponses().stream().collect(Collectors.summarizingLong(v -> v)).getSum();
    }
@Test
    public void testDelPipeline() {
        byte[] k = "key".getBytes();
        byte[] v = "val".getBytes();
        connection.set(k, v);

        connection.openPipeline();
        connection.get(k);
        connection.del(k);
        List<Object> results = connection.closePipeline();
        byte[] val = (byte[])results.get(0);
        assertThat(val).isEqualTo(v);
        Long res = (Long) results.get(1);
        assertThat(res).isEqualTo(1);
    }