### Question:
TopicClusterSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); String topic = commandLine.getOptionValue('t').trim(); try { defaultMQAdminExt.start(); Set<String> clusters = defaultMQAdminExt.getTopicClusterList(topic); for (String value : clusters) { System.out.printf("%s%n", value); } } catch (Exception e) { throw new SubCommandException(this.getClass().getSimpleName() + " command failed", e); } finally { defaultMQAdminExt.shutdown(); } }  @Override String commandName(); @Override String commandDesc(); @Override Options buildCommandlineOptions(Options options); @Override void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook);  }### Answer:
@Test public void testExecute() { TopicClusterSubCommand cmd = new TopicClusterSubCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-t unit-test"}; final CommandLine commandLine = ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs, cmd.buildCommandlineOptions(options), new PosixParser()); assertThat(commandLine.getOptionValue('t').trim()).isEqualTo("unit-test"); }