TableSchema implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TableSchema other = (TableSchema) obj; if (tableId == null) { if (other.tableId != null) { return false; } } else if (!tableId.equals(other.tableId)) { return false; } if (tableName == null) { if (other.tableName != null) { return false; } } else if (!tableName.equals(other.tableName)) { return false; } return true; } TableSchema(); String getTableId(); void setTableId(String tableId); List<ColumnSchema> getListOfColumns(); void setListOfColumns(List<ColumnSchema> listOfColumns); SchemaEvolution getSchemaEvalution(); void setSchemaEvalution(SchemaEvolution schemaEvalution); String getTableName(); void setTableName(String tableName); ColumnSchema getColumnSchemaByName(String columnName); ColumnSchema getColumnSchemaById(String columnUniqueId); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testTableInfoEquals() { TableSchema cmpEqualsTableSchema = getTableSchema("1000", "tableSchemaTestTable"); TableSchema cmpNotEqualsTableSchema = getTableSchema("1000", "tableSchemaTestTable2"); assertTrue(tableSchema.equals(cmpEqualsTableSchema)); assertTrue(!(tableSchema.equals(cmpNotEqualsTableSchema))); }