@Test
  public void testKillQueryAuthorization() throws Exception {
    int queryStatus = driver.compile("select " + viewName + ".i, " + tableName + ".city from "
            + viewName + " join " + tableName + " on " + viewName + ".city = " + tableName
            + ".city where " + tableName + ".k = 'X'", true);
    assertEquals(0, queryStatus);

    resetAuthorizer();
    QueryState queryState = driver.getQueryState();
    String queryId = queryState.getQueryId();
    int killQueryStatus = driver.compile("kill query '" + queryId + "'", true);
    assertEquals(0, killQueryStatus);
    driver.run();

    List<HivePrivilegeObject> inputs = getHivePrivilegeObjectInputs().getLeft();
    HivePrivilegeObject dbObj = inputs.get(0);
    assertEquals("input type", HivePrivilegeObjectType.SERVICE_NAME, dbObj.getType());
    assertEquals("object name","hiveservice", dbObj.getObjectName());
  }
Unit test for HIVE-25532.
Checks if the right privilege objects are being sent when a kill query call is made.
@throws Exception
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/authorization/plugin/TestHiveAuthorizerCheckInvocation.java