@Test
public void testGetQueueInfo() throws Exception {

  YarnScheduler yarnScheduler = mock(YarnScheduler.class);
  RMContext rmContext = mock(RMContext.class);
  mockRMContext(yarnScheduler, rmContext);
  ClientRMService rmService = new ClientRMService(rmContext, yarnScheduler,
      null, null, null, null);
  GetQueueInfoRequest request = recordFactory
      .newRecordInstance(GetQueueInfoRequest.class);
  request.setQueueName("testqueue");
  request.setIncludeApplications(true);
  GetQueueInfoResponse queueInfo = rmService.getQueueInfo(request);
  List<ApplicationReport> applications = queueInfo.getQueueInfo()
      .getApplications();
  Assert.assertEquals(2, applications.size());
  request.setQueueName("nonexistentqueue");
  request.setIncludeApplications(true);
  // should not throw exception on nonexistent queue
  queueInfo = rmService.getQueueInfo(request);
}