RMAdminCLI extends HAAdmin { private int refreshQueues() throws IOException, YarnException { ResourceManagerAdministrationProtocol adminProtocol = createAdminProtocol(); RefreshQueuesRequest request = recordFactory.newRecordInstance(RefreshQueuesRequest.class); adminProtocol.refreshQueues(request); return 0; } RMAdminCLI();  RMAdminCLI(Configuration conf); @Override int run(String[] args); @Override void setConf(Configuration conf); static void main(String[] args);  }
@Test public void testRefreshQueues() throws Exception { String[] args = { "-refreshQueues" }; assertEquals(0, rmAdminCLI.run(args)); verify(admin).refreshQueues(any(RefreshQueuesRequest.class)); }