LongRangeUtil { public static long requireZero(long val) { if (val != 0) { throw new IllegalArgumentException(val + IS_NOT_ZERO); } 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 RequireZero() { testHelper(IS_ZERO, LongRangeUtil::requireZero); }
@Test void testRequireZero() { assertEquals(0, LongRangeUtil.requireZero(0, RuntimeException::new)); }
@Test void testRequireZero2() { assertThrows(RuntimeException.class, () -> LongRangeUtil.requireZero(1, RuntimeException::new)); }
@Test void testRequireZero3() { assertThrows(RuntimeException.class, () -> LongRangeUtil.requireZero(-1, RuntimeException::new)); }