private void testMM(boolean existingTable, boolean isSourceMM) throws Exception {
    HiveConf.setBoolVar(hiveConf, HiveConf.ConfVars.HIVE_CREATE_TABLES_AS_INSERT_ONLY, true);
    hiveConf.setBoolean("mapred.input.dir.recursive", true);

    int[][] data = {{1,2}, {3, 4}, {5, 6}};
    runStatementOnDriver("drop table if exists T");
    runStatementOnDriver("drop table if exists Tstage");

    if(existingTable) {
      runStatementOnDriver("create table T (a int, b int)");
    }

    runStatementOnDriver("create table Tstage (a int, b int)" +
        (isSourceMM ? "" : " tblproperties('transactional'='false')"));
    runStatementOnDriver("insert into Tstage" + TestTxnCommands2.makeValuesClause(data));
    runStatementOnDriver("export table Tstage to '" + getWarehouseDir() + "/1'");

    runStatementOnDriver("import table T from '" + getWarehouseDir() + "/1'");

    //verify data
    List<String> rs = runStatementOnDriver("select a, b from T order by a, b");
    Assert.assertEquals("reading imported data",
        TestTxnCommands2.stringifyValues(data), rs);
    //verify that we are indeed doing an Acid write (import)
    rs = runStatementOnDriver("select INPUT__FILE__NAME from T order by INPUT__FILE__NAME");
    Assert.assertEquals(3, rs.size());
    for (String s : rs) {
      Assert.assertTrue(s, s.contains("/delta_0000001_0000001_0000/"));
      Assert.assertTrue(s, s.endsWith("/000000_0"));
    }
  }
import all partitions from archive - target table needs to be created.
export is made from acid table so that target table is created as acid
ql/src/test/org/apache/hadoop/hive/ql/TestTxnExIm.java