### Question:
JobQueueClient extends Configured implements Tool { void printJobQueueInfo(JobQueueInfo jobQueueInfo, Writer writer) throws IOException { printJobQueueInfo(jobQueueInfo, writer, ""); } JobQueueClient();  JobQueueClient(JobConf conf); @Override int run(String[] argv); static void main(String[] argv);  }### Answer:
@Test @SuppressWarnings("deprecation") public void testPrintJobQueueInfo() throws IOException { JobQueueClient queueClient = new JobQueueClient(); JobQueueInfo parent = new JobQueueInfo(); JobQueueInfo child = new JobQueueInfo(); JobQueueInfo grandChild = new JobQueueInfo(); child.addChild(grandChild); parent.addChild(child); grandChild.setQueueName("GrandChildQueue"); ByteArrayOutputStream bbos = new ByteArrayOutputStream(); PrintWriter writer = new PrintWriter(bbos); queueClient.printJobQueueInfo(parent, writer); Assert.assertTrue("printJobQueueInfo did not print grandchild's name", bbos.toString().contains("GrandChildQueue")); }