@Test
  public void testCompactionInfoEquals() {
    CompactionInfo compactionInfo = new CompactionInfo("dbName", "tableName", "partName", CompactionType.MINOR);
    CompactionInfo compactionInfo1 = new CompactionInfo("dbName", "tableName", "partName", CompactionType.MINOR);
    assertEquals("The object must be equal", compactionInfo, compactionInfo);

    Assert.assertNotEquals("The object must be not equal", compactionInfo, new Object());
    assertEquals("The object must be equal", compactionInfo, compactionInfo1);
  }
Users have the choice of specifying compaction related tblproperties either in CREATE TABLE
statement or in ALTER TABLE .. COMPACT statement. This tests both cases.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestCompactor.java