### Question:
Scalars { public static boolean isZero(double val) { return isZero(val, DEFAULT_EPSILON); } private  Scalars(); static boolean isZero(double val); static boolean isZero(double val, double epsilon); static double log2(double x); static double digamma(double x); static final double DEFAULT_EPSILON; }### Answer:
@Test public void testOneIsNotZero() { assertThat(Scalars.isZero(1), equalTo(false)); }
@Test public void testOneIsNotZeroWithEpsilon() { assertThat(Scalars.isZero(1, 1.0e-6), equalTo(false)); }
@Test public void testSmallIsZero() { assertThat(Scalars.isZero(1.0e-6, 1.0e-5), equalTo(true)); }
@Test public void testManyNumbersMightBeZero() { for (Pair<Double,Double> pair: somePairs(doubles(-10, 10), doubles(0, 2))) { assertThat(Scalars.isZero(pair.getFirst(), pair.getSecond()), equalTo(Math.abs(pair.getFirst()) < pair.getSecond())); } }
@Test public void testZeroIsZero() { assertThat(Scalars.isZero(0), equalTo(true)); }
@Test public void testZeroIsZeroWithEpsilon() { assertThat(Scalars.isZero(0, 1.0e-6), equalTo(true)); }