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