### Question:
BulkIngestKey implements WritableComparable<BulkIngestKey> { @Override public int hashCode() { return hashCode; } 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 testHashCode() { 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.hashCode(), bik2.hashCode()); bik2 = new BulkIngestKey(new Text("differentTableName"), key2); assertNotEquals(bik1.hashCode(), bik2.hashCode()); bik2 = new BulkIngestKey(tableName2, new Key()); assertNotEquals(bik1.hashCode(), bik2.hashCode()); bik2 = new BulkIngestKey(tableName2, null); assertNotEquals(bik1.hashCode(), bik2.hashCode()); }