### Question:
CommandManager implements Reportable { public CommandManager() { this(cmdArrays); } CommandManager();   CommandManager(Object[][] cmdArray); void addCommand(String cmd, Execable ex); synchronized void start(); synchronized void stop(); long submit(Command cmd); boolean isSuccess(long cmdid); boolean isFailure(long cmdid); @Override String getName(); CommandStatus getStatus(long id); @Override ReportEvent getReport();  }### Answer:
@Test public void testCommandManager() throws InterruptedException { CommandManager cmdman = new CommandManager(); List<Long> ids = new ArrayList<Long>(); for (int i = 0; i < 10; i++) { LOG.info("command manager start stop " + i); Command cmd = new Command("noop"); long id = cmdman.submit(cmd); ids.add(id); assertFalse(cmdman.isFailure(id)); assertFalse(cmdman.isSuccess(id)); } for (Long l : ids) { CommandStatus status = cmdman.getStatus(l); assertEquals("", status.getMessage()); assertTrue(status.isQueued()); } cmdman.start(); Clock.sleep(200); cmdman.stop(); for (Long l : ids) { CommandStatus status = cmdman.getStatus(l); assertEquals("", status.getMessage()); assertTrue(status.isSuccess()); assertFalse(cmdman.isFailure(l)); assertTrue(cmdman.isSuccess(l)); } LOG.info(cmdman.getReport()); }