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