### Question:
IndexMatch implements WritableComparable<IndexMatch> { @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append(uid + " - {"); for (String nodeKey : nodeSet.getNodeKeys()) { builder.append(nodeKey).append(" "); } builder.append("}"); return builder.toString(); } 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 testToString() { String uid = "uid"; JexlNode eqNode = JexlNodeFactory.buildEQNode("FIELD", "value"); IndexMatch indexMatch = new IndexMatch(uid, eqNode); String expectedString = "uid - {FIELD == 'value' }"; assertEquals(expectedString, indexMatch.toString()); }