### Question:
Preconditions { public static long requireNonNegative( long value ) { if ( value < 0 ) { throw new IllegalArgumentException( "Expected non-negative long value, got " + value ); } return value; } private  Preconditions(); static long requirePositive( long value ); static long requirePowerOfTwo( long value ); static int requirePositive( int value ); static long requireNonNegative( long value ); static int requireNonNegative( int value ); static int requireExactlyZero( int value ); static void checkState( boolean expression, String message ); static void checkArgument( boolean expression, String message, Object... args ); static void requireBetween( int value, int lowInclusive, int highExclusive );  }### Answer:
@Test void requireNonNegativeOk() { Preconditions.requireNonNegative( 0 ); Preconditions.requireNonNegative( 1 ); }
@Test void requireNonNegativeFailsOnNegative() { assertThrows( IllegalArgumentException.class, () -> Preconditions.requireNonNegative( -1 ) ); }