### Question:
BulkIngestKey implements WritableComparable<BulkIngestKey> { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; BulkIngestKey other = (BulkIngestKey) obj; return compareTo(other) == 0; } BulkIngestKey();  BulkIngestKey(Text tableName, Key key); Text getTableName(); Key getKey(); @Override void readFields(DataInput in); @Override void write(DataOutput out); @Override String toString(); void setTableName(final Text tableName); @Override int compareTo(BulkIngestKey other); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testEquals() { Text tableName1 = new Text("testTable"); Key key1 = new Key(new Text("row\0key"), new Text("colFam"), new Text("col\0qual"), new Text("col\0vis")); BulkIngestKey bik1 = new BulkIngestKey(tableName1, key1); Text tableName2 = new Text("testTable"); Key key2 = new Key(new Text("row\0key"), new Text("colFam"), new Text("col\0qual"), new Text("col\0vis")); BulkIngestKey bik2 = new BulkIngestKey(tableName2, key2); assertEquals(bik1, bik2); bik2 = new BulkIngestKey(new Text("differentTableName"), key2); assertFalse(bik1.equals(bik2)); bik2 = new BulkIngestKey(tableName2, new Key()); assertFalse(bik1.equals(bik2)); assertTrue(bik1.equals(bik1)); assertFalse(bik1.equals(null)); assertFalse(bik1.toString().equals("")); }