### Question:
IndexMatch implements WritableComparable<IndexMatch> { @Override public boolean equals(Object obj) { if (null == obj) return false; if (obj instanceof IndexMatch) { IndexMatch other = (IndexMatch) obj; if (!uid.equals(other.uid)) return false; return nodeSet.equals(other.nodeSet); } return false; } IndexMatch(final String uid); protected  IndexMatch();  IndexMatch(final String uid, final JexlNode myNode);  IndexMatch(final String uid, final JexlNode myNode, final String shard);  IndexMatch(final String uid, final JexlNode myNode, final IndexMatchType type);  IndexMatch(Set<JexlNode> nodes, String uid, final IndexMatchType type); String getUid(); JexlNode getNode(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(IndexMatch other); void setType(IndexMatchType type); void set(JexlNode node); void add(JexlNode node); @Override String toString(); @Override void readFields(DataInput in); @Override void write(DataOutput out);  }### Answer:
@Test public void testEquals() { IndexMatch left = new IndexMatch("uid0"); IndexMatch right = new IndexMatch("uid0"); assertEquals(left, right); assertEquals(right, left); assertNotEquals(left, null); }