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 testReturnsConverterForNumericTypes() {
    for (TypeName numericType : TypeName.NUMERIC_TYPES) {
      SerializableFunction<BigDecimal, ? extends Number> converter =
          BigDecimalConverter.forSqlType(numericType);

      assertNotNull(converter);
      assertNotNull(converter.apply(BigDecimal.TEN));
    }
  }