public TolerantLongComparison isNotWithin(long tolerance) {
    return new TolerantLongComparison() {
      @Override
      public void of(long expected) {
        Long actual = LongSubject.this.actual;
        checkNotNull(
            actual, "actual value cannot be null. tolerance=%s expected=%s", tolerance, expected);
        checkTolerance(tolerance);

        if (equalWithinTolerance(actual, expected, tolerance)) {
          failWithoutActual(
              fact("expected not to be", Long.toString(expected)),
              butWas(),
              fact("within tolerance", Long.toString(tolerance)));
        }
      }
    };
  }
@Test
  public void isNotWithinOf() {
    assertThatIsNotWithinFails(20000L, 0L, 20000L);
    assertThatIsNotWithinFails(20000L, 1L, 20000L);
    assertThatIsNotWithinFails(20000L, 10000L, 20000L);
    assertThatIsNotWithinFails(20000L, 10000L, 30000L);
    assertThatIsNotWithinFails(Long.MIN_VALUE, 1L, Long.MIN_VALUE + 1);
    assertThatIsNotWithinFails(Long.MAX_VALUE, 1L, Long.MAX_VALUE - 1);
    assertThatIsNotWithinFails(Long.MAX_VALUE / 2, Long.MAX_VALUE, -Long.MAX_VALUE / 2);
    assertThatIsNotWithinFails(-Long.MAX_VALUE / 2, Long.MAX_VALUE, Long.MAX_VALUE / 2);

    assertThat(20000L).isNotWithin(9999L).of(30000L);
    assertThat(20000L).isNotWithin(10000L).of(30001L);
    assertThat(Long.MIN_VALUE).isNotWithin(0L).of(Long.MAX_VALUE);
    assertThat(Long.MAX_VALUE).isNotWithin(0L).of(Long.MIN_VALUE);
    assertThat(Long.MIN_VALUE).isNotWithin(1L).of(Long.MIN_VALUE + 2);
    assertThat(Long.MAX_VALUE).isNotWithin(1L).of(Long.MAX_VALUE - 2);
    // Don't fall for rollover
    assertThat(Long.MIN_VALUE).isNotWithin(1L).of(Long.MAX_VALUE);
    assertThat(Long.MAX_VALUE).isNotWithin(1L).of(Long.MIN_VALUE);
  }