NumberLibrary { public static int ifNegative(int number, int ifNegative) { return ifLessThan(0, number, ifNegative); }  static Function<String, Integer> methodParseInteger(); static int ifNegative(int number, int ifNegative); static int ifLessThan(int bound, int number, int ifLess); static int ifGreaterThan(int bound, int number, int ifGreater); static int bounded(int min, int max, int target); static int sumInts(Iterable<Integer> values); static long sumLongs(Iterable<Long> values); static double sum(Iterable<? extends Number> values); static double mean(Collection<? extends Number> values); static double median(Collection<? extends T> values);  }
@Test public void changedIfNegative() { assertTrue(2 == ifNegative(2, 0)); assertTrue(2 == ifNegative(2, 2)); assertTrue(2 == ifNegative(2, 3)); assertTrue(2 == ifNegative(2, -1)); assertTrue(0 == ifNegative(-1, 0)); assertTrue(0 == ifNegative(0, 2)); }