TableInfo implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof TableInfo)) { return false; } TableInfo other = (TableInfo) obj; if (databaseName == null) { if (other.databaseName != null) { return false; } } else if (!tableUniqueName.equals(other.tableUniqueName)) { return false; } if (tableUniqueName == null) { if (other.tableUniqueName != null) { return false; } } else if (!tableUniqueName.equals(other.tableUniqueName)) { return false; } return true; } TableInfo(); TableSchema getFactTable(); void setFactTable(TableSchema factTable); List<TableSchema> getAggregateTableList(); void setAggregateTableList(List<TableSchema> aggregateTableList); String getDatabaseName(); void setDatabaseName(String databaseName); TableSchema getTableSchemaByName(String tableName); TableSchema getTableSchemaByTableId(String tableId); int getNumberOfAggregateTables(); String getTableUniqueName(); void setTableUniqueName(String tableUniqueName); long getLastUpdatedTime(); void setLastUpdatedTime(long lastUpdatedTime); String getMetaDataFilepath(); void setMetaDataFilepath(String metaDataFilepath); String getStorePath(); void setStorePath(String storePath); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testTableInfoEquals() { TableInfo cmpEqualsTableInfo = getTableInfo("tableInfoTestDatabase_equalsTableInfoTestTable"); TableInfo cmpNotEqualsTableInfo = getTableInfo("tableInfoTestDatabase_notEqualsTableInfoTestTable"); assertTrue(tableInfo.equals(cmpEqualsTableInfo)); assertTrue(!(tableInfo.equals(cmpNotEqualsTableInfo))); }