### Question:
Condition { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Condition)) return false; Condition condition = (Condition) o; return Objects.equals(cf, condition.cf) && Objects.equals(cq, condition.cq) && Objects.equals(cv, condition.cv) && Objects.equals(val, condition.val) && Objects.equals(ts, condition.ts) && Arrays.equals(iterators, condition.iterators); } Condition(CharSequence cf, CharSequence cq);  Condition(byte[] cf, byte[] cq);  Condition(Text cf, Text cq);  Condition(ByteSequence cf, ByteSequence cq); ByteSequence getFamily(); ByteSequence getQualifier(); Condition setTimestamp(long ts); Long getTimestamp(); Condition setValue(CharSequence value); Condition setValue(byte[] value); Condition setValue(Text value); Condition setValue(ByteSequence value); ByteSequence getValue(); Condition setVisibility(ColumnVisibility cv); ByteSequence getVisibility(); Condition setIterators(IteratorSetting... iterators); IteratorSetting[] getIterators(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testEquals() { ColumnVisibility cvis = new ColumnVisibility(VISIBILITY); c.setVisibility(cvis); c.setValue(VALUE); c.setTimestamp(1234L); c.setIterators(ITERATORS); assertEquals(c, c); assertFalse(c.equals(null)); Condition c2 = new Condition(FAMILY, QUALIFIER); c2.setVisibility(cvis); c2.setValue(VALUE); c2.setTimestamp(1234L); c2.setIterators(ITERATORS); assertEquals(c, c2); assertEquals(c2, c); Condition c3 = new Condition("nope", QUALIFIER); c3.setVisibility(cvis); c3.setValue(VALUE); c3.setTimestamp(1234L); c3.setIterators(ITERATORS); assertNotEquals(c, c3); assertNotEquals(c3, c); c3 = new Condition(FAMILY, "nope"); c3.setVisibility(cvis); c3.setValue(VALUE); c3.setTimestamp(1234L); c3.setIterators(ITERATORS); assertNotEquals(c, c3); assertNotEquals(c3, c); c2.setVisibility(new ColumnVisibility("sekrit")); assertNotEquals(c, c2); assertNotEquals(c2, c); c2.setVisibility(cvis); c2.setValue(EMPTY); assertNotEquals(c, c2); assertNotEquals(c2, c); c2.setValue(VALUE); c2.setTimestamp(2345L); assertNotEquals(c, c2); assertNotEquals(c2, c); c2.setTimestamp(1234L); c2.setIterators(); assertNotEquals(c, c2); assertNotEquals(c2, c); c2.setIterators(ITERATORS); assertEquals(c, c2); assertEquals(c2, c); Condition c4 = new Condition(FAMILY, QUALIFIER); c4.setValue(VALUE); c4.setTimestamp(1234L); c4.setIterators(ITERATORS); assertNotEquals(c, c4); assertNotEquals(c4, c); Condition c5 = new Condition(FAMILY, QUALIFIER); c5.setVisibility(cvis); c5.setValue(VALUE); c5.setIterators(ITERATORS); assertNotEquals(c, c5); assertNotEquals(c5, c); Condition c6 = new Condition(FAMILY, QUALIFIER); c6.setVisibility(cvis); c6.setTimestamp(1234L); c6.setIterators(ITERATORS); assertNotEquals(c, c6); assertNotEquals(c6, c); Condition c7 = new Condition(FAMILY, QUALIFIER); Condition c8 = new Condition(FAMILY, QUALIFIER); assertEquals(c7, c8); assertEquals(c8, c7); }