justification="Check String.equals is used, not ==")
private void checkEqualityTerm(String t, int split, int flush) throws Exception
{
SplitEmittedTerm t1 = new SplitEmittedTerm(t, split, flush);
SETRawComparatorTerm compare = new SETRawComparatorTerm();
SETRawComparatorTermSplitFlush compare2 = new SETRawComparatorTermSplitFlush();
assertEquals(0, t1.compareTo(t1));
assertTrue(t1.equals(t1));
assertEquals(0, compare.compare(t1, t1));
assertEquals(0, compare2.compare(t1, t1));
byte[] t1w = toBytes(t1);
assertEquals(0, compare.compare(t1w, 0, t1w.length, t1w, 0, t1w.length));
assertEquals(0, compare2.compare(t1w, 0, t1w.length, t1w, 0, t1w.length));
SplitEmittedTerm t1a = new SplitEmittedTerm(new String(t), split, flush);
assertEquals(0, t1.compareTo(t1a));
assertEquals(0, t1a.compareTo(t1));
assertTrue(t1.equals(t1a));
assertTrue(t1a.equals(t1));
assertEquals(0, compare.compare(t1, t1a));
assertEquals(0, compare.compare(t1a, t1));
assertEquals(0, compare2.compare(t1, t1a));
assertEquals(0, compare2.compare(t1a, t1));
}