@Test
  public void testActionTypeForPartitionedTable() throws Exception {
    runCmd("CREATE EXTERNAL TABLE Part (eid int, name int) PARTITIONED BY (position int, dept int, sal int)");
    reset(mockedAuthorizer);
    runCmd("insert overwrite table part partition(position=2,DEPT,SAL) select 2,2,2,2");
    Pair<List<HivePrivilegeObject>, List<HivePrivilegeObject>> io = getHivePrivilegeObjectInputs();
    List<HivePrivilegeObject> hpoList = io.getValue();
    Assert.assertFalse(hpoList.isEmpty());
    for (HivePrivilegeObject hpo : hpoList) {
      Assert.assertEquals(hpo.getActionType(), HivePrivilegeObject.HivePrivObjectActionType.INSERT_OVERWRITE);
    }
  }
This factory creates a mocked HiveAuthorizer class. Use the mocked class to
capture the argument passed to it in the test case.
ql/src/test/org/apache/hadoop/hive/ql/security/authorization/plugin/TestHivePrivilegeObjectOwnerNameAndType.java