@Override
    public void execute(CommandLine commandLine, Options options,
        RPCHook rpcHook) throws SubCommandException {

        DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook);
        defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()));

        try {

            if (commandLine.hasOption('b')) {
                String addr = commandLine.getOptionValue('b').trim();
                defaultMQAdminExt.start();
                printClusterBaseInfo(defaultMQAdminExt, addr);

                System.out.printf("get broker's plain access config version success. Address:%s %n", addr);
                return;

            } else if (commandLine.hasOption('c')) {
                String clusterName = commandLine.getOptionValue('c').trim();

                defaultMQAdminExt.start();

                Set<String> masterSet =
                    CommandUtil.fetchMasterAddrByClusterName(defaultMQAdminExt, clusterName);
                System.out.printf("%-16s  %-22s  %-22s  %-20s  %-22s  %-22s%n",
                    "#Cluster Name",
                    "#Broker Name",
                    "#Broker Addr",
                    "#AclFilePath",
                    "#AclConfigVersionNum",
                    "#AclLastUpdateTime"
                );
                for (String addr : masterSet) {
                    printClusterBaseInfo(defaultMQAdminExt, addr);
                }
                System.out.printf("get cluster's plain access config version success.%n");

                return;
            }

            ServerUtil.printCommandLineHelp("mqadmin " + this.commandName(), options);
        } catch (Exception e) {
            throw new SubCommandException(this.getClass().getSimpleName() + " command failed", e);
        } finally {
            defaultMQAdminExt.shutdown();
        }
    }
@Test
    public void testExecute() {
        ClusterAclConfigVersionListSubCommand cmd = new ClusterAclConfigVersionListSubCommand();
        Options options = ServerUtil.buildCommandlineOptions(new Options());
        String[] subargs = new String[] {"-c default-cluster"};
        final CommandLine commandLine =
            ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs,
                cmd.buildCommandlineOptions(options), new DefaultParser());
        assertThat(commandLine.getOptionValue('c').trim()).isEqualTo("default-cluster");
    }