PublishCommand extends AbstractRedisCommand<Object> { public PublishCommand(SimpleObjectPool<NettyClient> clientPool, ScheduledExecutorService scheduled, String pubChannel, String message) { super(clientPool, scheduled); this.pubChannel = pubChannel; this.message = message; } PublishCommand(SimpleObjectPool<NettyClient> clientPool, ScheduledExecutorService scheduled,
                          String pubChannel, String message);  PublishCommand(SimpleObjectPool<NettyClient> clientPool, ScheduledExecutorService scheduled, int commandTimeoutMilli, String pubChannel, String message); @Override ByteBuf getRequest(); @Override String getName();  }
@Test public void testPublishCommand() throws ExecutionException, InterruptedException { publishCommand.future().addListener(commandFuture -> { Assert.assertEquals("+OK", commandFuture.get()); }); publishCommand.execute().get(); }