### Question:
ElementsTrackingQueueCliTool { public static void main(String[] args) throws Exception { ElementsTrackingQueueCliTool client = null; try { client = new ElementsTrackingQueueCliTool(); client.configure(args); } catch (ParseException e) { printHelp(); return; } catch (Throwable e) { printHelp(); Thread.sleep(10); System.out.println("ERROR"); e.printStackTrace(); return; } client.execute(); }  static void main(String[] args); String configure(String args[]); void execute(); static final String CMD_LIST; static final String CMD_REMOVE; static final String CMD_REMOVE_ALL; static final String CMD_PROMOTE; static final String CMD_HELP; }### Answer:
@Test public void testBasics() throws Exception { queue.add(new Element("elem1", "data1")); queue.add(new Element("elem2", "data2")); queue.add(new Element("elem3", "data3")); queue.take("consumer1"); Assert.assertEquals(2, getQueuedCount(queue)); Assert.assertEquals(1, Iterators.size(queue.getBeingConsumed())); String qOpts = " --zk-connection " + zkServer.getConnectionStr() + " --queue-name " + queueName; ElementsTrackingQueueCliTool.main(("list" + qOpts).split(" ")); ElementsTrackingQueueCliTool.main(("remove --element elem1" + qOpts).split(" ")); Assert.assertEquals(2, getQueuedCount(queue)); Assert.assertEquals(0, Iterators.size(queue.getBeingConsumed())); ElementsTrackingQueueCliTool.main(("list " + qOpts).split(" ")); Assert.assertEquals("elem2", queue.getQueued().next().getElement().getId()); ElementsTrackingQueueCliTool.main(("promote --element elem3" + qOpts).split(" ")); Assert.assertEquals("elem3", queue.getQueued().next().getElement().getId()); ElementsTrackingQueueCliTool.main(("list " + qOpts).split(" ")); ElementsTrackingQueueCliTool.main(("remove --element elem2" + qOpts).split(" ")); Assert.assertEquals(1, getQueuedCount(queue)); Assert.assertEquals(0, Iterators.size(queue.getBeingConsumed())); ElementsTrackingQueueCliTool.main(("list " + qOpts).split(" ")); ElementsTrackingQueueCliTool.main(("remove_all" + qOpts).split(" ")); Assert.assertEquals(0, getQueuedCount(queue)); Assert.assertEquals(0, Iterators.size(queue.getBeingConsumed())); ElementsTrackingQueueCliTool.main(("list " + qOpts).split(" ")); }