### Question:
LangUtils { public static double parseDouble(String s) { double value = Double.parseDouble(s); Preconditions.checkArgument(Doubles.isFinite(value), "Bad value: %s", value); return value; } private  LangUtils(); static float parseFloat(String s); static double parseDouble(String s); static int hashDouble(double d);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testDoubleNaN() { LangUtils.parseDouble("NaN"); }
@Test(expected = IllegalArgumentException.class) public void testDoubleInf() { LangUtils.parseDouble("Infinity"); }
@Test public void testDouble() { assertEquals(3.1, LangUtils.parseDouble("3.1")); }