### Question:
Preconditions { public static long requirePositive( long value ) { if ( value < 1 ) { throw new IllegalArgumentException( "Expected positive 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 requirePositiveOk() { requirePositive( 1 ); }
@Test void requirePositiveFailsOnZero() { assertThrows( IllegalArgumentException.class, () -> Preconditions.requirePositive( 0 ) ); }
@Test void requirePositiveFailsOnNegative() { assertThrows( IllegalArgumentException.class, () -> requirePositive( -1 ) ); }