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