public static SerializableFunction<BigDecimal, ? extends Number> forSqlType(TypeName typeName) {
    if (!CONVERTER_MAP.containsKey(typeName)) {
      throw new UnsupportedOperationException(
          "Conversion from " + typeName + " to BigDecimal is not supported");
    }

    return CONVERTER_MAP.get(typeName);
  }
@Test
  public void testThrowsForUnsupportedTypes() {
    thrown.expect(UnsupportedOperationException.class);
    BigDecimalConverter.forSqlType(TypeName.STRING);
  }