IncrRequest extends AsciiRequest<Long> { public static IncrRequest createDecr(final byte[] key, final long value) { return new IncrRequest(DECR_CMD, key, value); } private  IncrRequest(final byte[] operation, final byte[] key, final long by); static IncrRequest createIncr(final byte[] key, final long value); static IncrRequest createDecr(final byte[] key, final long value); @Override ByteBuf writeRequest(final ByteBufAllocator alloc, final ByteBuffer dst); @Override void handle(final AsciiResponse response, final HostAndPort server); long getBy(); long multiplier();  }
@Test public void testDecrRequest() { IncrRequest req = IncrRequest.createDecr("foo".getBytes(StandardCharsets.UTF_8), 2); assertRequest(req, "decr" + " foo 2\r\n"); }