public static double parseDouble(final String str) {
    final double d = Double.parseDouble(str);
    if (Double.isInfinite(d) || Double.isNaN(d)) {
      throw new NumberFormatException("Invalid double value: " + str);
    }
    return d;
  }
@Test
  public void shouldThrowIfNotNumber() {
    assertThrows(NumberFormatException.class, () -> SqlDoubles.parseDouble("What no number?"));
  }