public static DecimalNum valueOf(String val) {
        if (val.equalsIgnoreCase("NAN")) {
            throw new NumberFormatException();
        }
        return new DecimalNum(val);
    }
@Test(expected = NumberFormatException.class)
    public void testValueOfForFloatNaNShouldThrowNumberFormatException() {
        DecimalNum.valueOf(Float.NaN);
    }