### Question:
HSAdminServer extends AbstractService implements HSAdminProtocol { @Override public void refreshAdminAcls() throws IOException { UserGroupInformation user = checkAcls("refreshAdminAcls"); Configuration conf = createConf(); adminAcl = new AccessControlList(conf.get(JHAdminConfig.JHS_ADMIN_ACL, JHAdminConfig.DEFAULT_JHS_ADMIN_ACL)); HSAuditLogger.logSuccess(user.getShortUserName(), "refreshAdminAcls", HISTORY_ADMIN_SERVER); } HSAdminServer(AggregatedLogDeletionService aggLogDelService,
      JobHistory jobHistoryService); @Override void serviceInit(Configuration conf); @Override String[] getGroupsForUser(String user); @Override void refreshUserToGroupsMappings(); @Override void refreshSuperUserGroupsConfiguration(); @Override void refreshAdminAcls(); @Override void refreshLoadedJobCache(); @Override void refreshLogRetentionSettings(); @Override void refreshJobRetentionSettings();  }### Answer:
@Test public void testRefreshAdminAcls() throws Exception { conf.set(JHAdminConfig.JHS_ADMIN_ACL, UserGroupInformation.getCurrentUser() .getUserName()); String[] args = new String[1]; args[0] = "-refreshAdminAcls"; hsAdminClient.run(args); args[0] = "-refreshSuperUserGroupsConfiguration"; hsAdminClient.run(args); conf.set(JHAdminConfig.JHS_ADMIN_ACL, "notCurrentUser"); args[0] = "-refreshAdminAcls"; hsAdminClient.run(args); Throwable th = null; args[0] = "-refreshSuperUserGroupsConfiguration"; try { hsAdminClient.run(args); } catch (Exception e) { th = e; } assertTrue(th instanceof RemoteException); }