private static String getCommand(boolean isTruncateTest, boolean isPartitioned, String testTableName) {
    if (isTruncateTest) {
      return String.format(TRUNCATE_TABLE_COMMAND_FORMAT, testTableName);
    } else if (isPartitioned) {
      return String.format(INSERT_OVERWRITE_COMMAND_PARTITIONED_FORMAT, testTableName);
    } else {
      return String.format(INSERT_OVERWRITE_COMMAND_FORMAT, testTableName);
    }
  }
Test util method to run the insert overwrite table or truncate table test on a table

@param isAutoPurge - If set, creates a table with auto.purge with the given value
@param isExternal - if set creates a external table for the test
@param isPartitioned - if set creates a partitioned table for the test
@param purgeExpected - if set the assert condition for the test is such that it expectes old
         table data to be moved to trash. If not creates a assert condition to make sure that
         data is not moved to trash
@param isTruncateTest - if set uses truncate table command for the test. Otherwise uses Insert
         overwrite table command for the test
@param testTableName - table name for the test table
@throws Exception
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestAutoPurgeTables.java