### Question:
MathUtils { public static boolean isUnitInterval( String value ) { if ( !isNumeric( value ) ) { return false; } Double dbl = Double.parseDouble( value ); return dbl >= 0d && dbl <= 1d; }  static boolean isValidDouble( Double d ); static double getFloor( double value ); static double getRounded( double value ); static Object getRoundedObject( Object value ); static double roundSignificant( double value ); static double roundToSignificantDigits( double value, int n ); static double roundFraction( double value, int n ); static int getMin( int number, int min ); static int getMax( int number, int max ); static int getWithin( int value, int min, int max ); static boolean isNumeric( String value ); static boolean isNumericLenient( String value ); static boolean isUnitInterval( String value ); static boolean isPercentage( String value ); static boolean isInteger( String value ); static boolean isPositiveInteger( String value ); static boolean isZeroOrPositiveInteger( String value ); static boolean isCoordinate( String value ); static boolean isNegativeInteger( String value ); static boolean isZero( String value ); static boolean isBool( String value ); static boolean isEqual( Double d1, Double d2 ); static boolean isEqual( double d1, double d2 ); static boolean isZero( double value ); static double zeroIfNull( Double value ); static int getRandom(); static Double getMin( double[] array ); static Double getMax( double[] array ); static Double getAverage( List<Double> values ); static Double getSum( List<Double> values ); static Double parseDouble( String value ); static Integer parseInt( String string ); static double getLowBound( double stdDev, double stdDevNo, double average ); static double getHighBound( double stdDev, double stdDevFactor, double average ); static int divideToCeil( int numerator, int denominator ); static int divideToFloor( int numerator, int denominator ); static final Double ZERO; static final String NUMERIC_REGEXP; static final String NUMERIC_LENIENT_REGEXP; }### Answer:
@Test public void testIsUnitInterval() { assertTrue( MathUtils.isUnitInterval( "0" ) ); assertTrue( MathUtils.isUnitInterval( "0.2" ) ); assertTrue( MathUtils.isUnitInterval( "0.876" ) ); assertTrue( MathUtils.isUnitInterval( "1" ) ); assertFalse( MathUtils.isUnitInterval( "2" ) ); assertFalse( MathUtils.isUnitInterval( "-1" ) ); assertFalse( MathUtils.isUnitInterval( "abc" ) ); assertFalse( MathUtils.isUnitInterval( "1.01" ) ); }