@Override
  public AppState getAppState(HttpServletRequest hsr, String appId)
      throws AuthorizationException {
    try {
      DefaultRequestInterceptorREST interceptor = getOrCreateInterceptorByAppId(appId);
      if (interceptor != null) {
        return interceptor.getAppState(hsr, appId);
      }
    } catch (YarnException | IllegalArgumentException e) {
      LOG.error("getHomeSubClusterInfoByAppId error, applicationId = {}.", appId, e);
    }
    return new AppState();
  }
@Test
  public void testGetApplicationStateNotExists() throws IOException {

    ApplicationId appId =
        ApplicationId.newInstance(Time.now(), 1);

    AppState response = interceptor.getAppState(null, appId.toString());

    Assert.assertNull(response);
  }