LongRangeUtil { public static long requireNotEquals(long val, long otherVal) { if (val == otherVal) { throw new IllegalArgumentException(val + IS_EQUAL_TO + otherVal); } return val; } private  LongRangeUtil(); static long requirePositive(long val); static long requireNegative(long val); static long requireZero(long val); static long requireNonPositive(long val); static long requireNonNegative(long val); static long requireNonZero(long val); static long requireEquals(long val, long otherVal); static long requireNotEquals(long val, long otherVal); static long requireInRange(long val, long first, long lastExclusive); static long requireInRangeClosed(long val, long first, long lastInclusive); static long requirePositive(long val, Function<String, E> exceptionConstructor); static long requireNegative(long val, Function<String, E> exceptionConstructor); static long requireZero(long val, Function<String, E> exceptionConstructor); static long requireNonPositive(long val, Function<String, E> exceptionConstructor); static long requireNonNegative(long val, Function<String, E> exceptionConstructor); static long requireNonZero(long val, Function<String, E> exceptionConstructor); static long requireEquals(long val, long otherVal, Function<String, E> exceptionConstructor); static long requireNotEquals(long val, long otherVal, Function<String, E> exceptionConstructor); static long requireInRange(long val, long first, long lastExclusive, Function<String, E> exceptionConstructor); static long requireInRangeClosed(long val, long first, long lastInclusive, Function<String, E> exceptionConstructor);  }
@Test void RequireNotEquals() { final long otherVal = 3; testHelper(l -> l != otherVal, l -> LongRangeUtil.requireNotEquals(l, otherVal)); }
@Test void testRestRequireNotEquals() { assertEquals(0.0, LongRangeUtil.requireNotEquals(0, -1, RuntimeException::new)); }
@Test void testRestRequireNotEquals2() { assertEquals(0.0, LongRangeUtil.requireNotEquals(0, 1, RuntimeException::new)); }
@Test void testRestRequireNotEquals3() { assertThrows(RuntimeException.class, () -> LongRangeUtil.requireNotEquals(0,0, RuntimeException::new)); }
@Test void testRestRequireNotEquals4() { assertEquals(1.0, LongRangeUtil.requireNotEquals(1, 0, RuntimeException::new)); }
@Test void testRestRequireNotEquals5() { assertEquals(1.0, LongRangeUtil.requireNotEquals(1, -1, RuntimeException::new)); }
@Test void testRestRequireNotEquals6() { assertThrows(RuntimeException.class, () -> LongRangeUtil.requireNotEquals(1,1, RuntimeException::new)); }
@Test void testRestRequireNotEquals7() { assertEquals(-1.0, LongRangeUtil.requireNotEquals(-1, 0, RuntimeException::new)); }
@Test void testRestRequireNotEquals8() { assertEquals(-1.0, LongRangeUtil.requireNotEquals(-1, 1, RuntimeException::new)); }
@Test void testRestRequireNotEquals9() { assertThrows(RuntimeException.class, () -> LongRangeUtil.requireNotEquals(-1,-1, RuntimeException::new)); }