@Override
  public RefreshAdminAclsResponse refreshAdminAcls(RefreshAdminAclsRequest request)
      throws YarnException, IOException {

    // parameter verification.
    if (request == null) {
      routerMetrics.incrRefreshAdminAclsFailedRetrieved();
      RouterServerUtil.logAndThrowException("Missing RefreshAdminAcls request.", null);
    }

    // call refreshAdminAcls of activeSubClusters.
    try {
      long startTime = clock.getTime();
      RMAdminProtocolMethod remoteMethod = new RMAdminProtocolMethod(
          new Class[] {RefreshAdminAclsRequest.class}, new Object[] {request});
      String subClusterId = request.getSubClusterId();
      Collection<RefreshAdminAclsResponse> refreshAdminAclsResps =
          remoteMethod.invokeConcurrent(this, RefreshAdminAclsResponse.class, subClusterId);
      if (CollectionUtils.isNotEmpty(refreshAdminAclsResps)) {
        long stopTime = clock.getTime();
        routerMetrics.succeededRefreshAdminAclsRetrieved(stopTime - startTime);
        return RefreshAdminAclsResponse.newInstance();
      }
    } catch (YarnException e) {
      routerMetrics.incrRefreshAdminAclsFailedRetrieved();
      RouterServerUtil.logAndThrowException(e,
          "Unable to refreshAdminAcls due to exception. " + e.getMessage());
    }

    routerMetrics.incrRefreshAdminAclsFailedRetrieved();
    throw new YarnException("Unable to refreshAdminAcls.");
  }
@Test
  public void testRefreshAdminAcls() throws Exception {
    // null request.
    LambdaTestUtils.intercept(YarnException.class, "Missing RefreshAdminAcls request.",
        () -> interceptor.refreshAdminAcls(null));

    // normal request.
    RefreshAdminAclsRequest request = RefreshAdminAclsRequest.newInstance();
    RefreshAdminAclsResponse response = interceptor.refreshAdminAcls(request);
    assertNotNull(response);
  }