ShortPathPart { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ShortPathPart)) { return false; } ShortPathPart other = (ShortPathPart) obj; return position == other.position && Objects.equals(inLogicalLevel, other.inLogicalLevel); } ShortPathPart(int position, int inLogicalLevel);  ShortPathPart(int position, SplitLevel inLogicalLevel); int getPosition(); SplitLevel getInLogicalLevel(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testEquals() { ShortPathPart part1 = new ShortPathPart(1, 4); ShortPathPart part2 = new ShortPathPart(1, 4); ShortPathPart part3 = new ShortPathPart(1, 4); ShortPathPart part4 = new ShortPathPart(2, 4); ShortPathPart part5 = new ShortPathPart(1, 5); Tests.testEquals(part1, part2, part3, part4, part5); }