@Override
  public int compare(ClonePart part1, ClonePart part2) {
    int c = RESOURCE_ID_COMPARATOR.compare(part1, part2);
    if (c == 0) {
      if (part1.getUnitStart() <= part2.getUnitStart()) {
        if (part2.getUnitStart() + l2 <= part1.getUnitStart() + l1) {
          // part1 contains part2
          return 0;
        } else {
          // SortedListsUtils#contains should continue search
          return -1;
        }
      } else {
        // unitStart of part1 is less than unitStart of part2 - SortedListsUtils#contains should stop search
        return 1;
      }
    } else {
      return c;
    }
  }
@Test
  public void shouldCompare() {
    assertThat(compare("a", 0, 0, "b", 0, 0), is(-1));
    assertThat(compare("b", 0, 0, "a", 0, 0), is(1));

    assertThat(compare("a", 0, 0, "a", 0, 0), is(0));
    assertThat(compare("a", 1, 0, "a", 0, 0), is(1));
    assertThat(compare("a", 0, 0, "a", 0, 1), is(-1));
  }