### Question:
PrecisionNum implements Num { public static PrecisionNum valueOf(String val) { if (val.equalsIgnoreCase("NAN")) { throw new NumberFormatException(); } return new PrecisionNum(val); } private  PrecisionNum(String val); private  PrecisionNum(String val, int precision); private  PrecisionNum(short val); private  PrecisionNum(int val); private  PrecisionNum(long val); private  PrecisionNum(float val); private  PrecisionNum(double val); private  PrecisionNum(BigDecimal val, int precision); static PrecisionNum valueOf(String val); static PrecisionNum valueOf(String val, int precision); static PrecisionNum valueOf(short val); static PrecisionNum valueOf(int val); static PrecisionNum valueOf(long val); static PrecisionNum valueOf(float val); static PrecisionNum valueOf(BigDecimal val); static PrecisionNum valueOf(BigDecimal val, int precision); static PrecisionNum valueOf(double val); static PrecisionNum valueOf(PrecisionNum val); static PrecisionNum valueOf(Number val); @Override Function<Number, Num> function(); @Override BigDecimal getDelegate(); MathContext getMathContext(); @Override String getName(); @Override Num plus(Num augend); @Override Num minus(Num subtrahend); @Override Num multipliedBy(Num multiplicand); @Override Num dividedBy(Num divisor); @Override Num remainder(Num divisor); Num floor(); Num ceil(); @Override Num pow(int n); Num sqrt(); @Override Num sqrt(int precision); Num log(); @Override Num abs(); @Override boolean isZero(); @Override boolean isPositive(); @Override boolean isPositiveOrZero(); @Override boolean isNegative(); @Override boolean isNegativeOrZero(); @Override boolean isEqual(Num other); boolean matches(Num other, int precision); boolean matches(Num other, Num delta); @Override boolean isGreaterThan(Num other); @Override boolean isGreaterThanOrEqual(Num other); @Override boolean isLessThan(Num other); @Override boolean isLessThanOrEqual(Num other); @Override int compareTo(Num other); @Override Num min(Num other); @Override Num max(Num other); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override Num pow(Num n);  }### Answer:
@Test(expected = NumberFormatException.class) public void testValueOfForFloatNaNShouldThrowNumberFormatException() { PrecisionNum.valueOf(Float.NaN); }
@Test(expected = NumberFormatException.class) public void testValueOfForDoubleNaNShouldThrowNumberFormatException() { PrecisionNum.valueOf(Double.NaN); }