@Test
  public void testPrivilegedDistCpWithSameUserAsCurrentDoesNotTryToImpersonate() throws Throwable {
    primary
        .run("use " + primaryDbName)
        .run("create table t1 (id int)")
        .run("insert into t1 values (1),(2),(3)")
        .run("insert into t1 values (11),(12),(13)")
        .dump(primaryDbName);

    /*
      We have to do a comparision on the data of table t1 in replicated database because even though the file
      copy will fail due to impersonation failure the driver will return a success code 0. May be something to look at later
    */
    replica.load(replicatedDbName, primaryDbName)
        .run("select * from " + replicatedDbName + ".t1")
        .verifyResults(Arrays.asList("1", "2", "3", "12", "11", "13"));
  }
We need to have to separate insert statements as we want the table to have two different data files.
This is required as one of the conditions for distcp to get invoked is to have more than 1 file.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestCopyUtils.java