@SuppressWarnings("unchecked")
  public void isEquivalentAccordingToCompareTo(@Nullable T expected) {
    if (checkNotNull((Comparable<Object>) actual).compareTo(checkNotNull(expected)) != 0) {
      failWithActual("expected value that sorts equal to", expected);
    }
  }
@Test
  public void isEquivalentAccordingToCompareTo() {
    assertThat(new StringComparedByLength("abc"))
        .isEquivalentAccordingToCompareTo(new StringComparedByLength("xyz"));

    expectFailureWhenTestingThat(new StringComparedByLength("abc"))
        .isEquivalentAccordingToCompareTo(new StringComparedByLength("abcd"));
    assertFailureValue("expected value that sorts equal to", "abcd");
  }