private HiveStreamingConnection prepareTableAndConnection(String dbName, String tblName, int batchSize) throws Exception {
    String agentInfo = "UT_" + Thread.currentThread().getName();

    dropTables(tblName);
    executeStatementOnDriver("CREATE TABLE " + tblName + "(b STRING) " +
        " PARTITIONED BY (a INT)" + //currently ACID requires table to be bucketed
        " STORED AS ORC  TBLPROPERTIES ('transactional'='true')", driver);

    StrictDelimitedInputWriter writer = StrictDelimitedInputWriter.newBuilder()
        .withFieldDelimiter(',')
        .build();

    // Create three folders with two different transactions
    return HiveStreamingConnection.newBuilder()
        .withDatabase(dbName)
        .withTable(tblName)
        .withAgentInfo(agentInfo)
        .withHiveConf(conf)
        .withRecordWriter(writer)
        .withStreamingOptimizations(true)
        // Transaction size has to be one or exception should happen.
        .withTransactionBatchSize(batchSize)
        .connect();
  }
After each major compaction, stats need to be updated on the table
1. create an ORC backed table (Orc is currently required by ACID)
2. populate with data
3. compute stats
4. Trigger major compaction (which should update stats)
5. check that stats have been updated

@throws Exception todo:
                  4. add a test with sorted table?
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java