SchedConfCLI extends Configured implements Tool { @VisibleForTesting void removeQueues(String args, SchedConfUpdateInfo updateInfo) { if (args == null) { return; } List<String> queuesToRemove = Arrays.asList(args.split(";")); updateInfo.setRemoveQueueInfo(new ArrayList<>(queuesToRemove)); } SchedConfCLI(); static void main(String[] args); @Override int run(String[] args);  }
@Test(timeout = 10000) public void testRemoveQueues() { SchedConfUpdateInfo schedUpdateInfo = new SchedConfUpdateInfo(); cli.removeQueues("root.a;root.b;root.c.c1", schedUpdateInfo); List<String> removeInfo = schedUpdateInfo.getRemoveQueueInfo(); assertEquals(3, removeInfo.size()); assertEquals("root.a", removeInfo.get(0)); assertEquals("root.b", removeInfo.get(1)); assertEquals("root.c.c1", removeInfo.get(2)); }