### Question:
LangUtils { public static float parseFloat(String s) { float value = Float.parseFloat(s); Preconditions.checkArgument(Floats.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 testFloatNaN() { LangUtils.parseFloat("NaN"); }
@Test(expected = IllegalArgumentException.class) public void testFloatInf() { LangUtils.parseFloat("Infinity"); }
@Test public void testFloat() { assertEquals(3.1f, LangUtils.parseFloat("3.1")); }