public static Validator mapWithDoubleValue() {
    return (name, val) -> {
      if (!(val instanceof String)) {
        throw new ConfigException(name, val, "Must be a string");
      }

      final String str = (String) val;
      final Map<String, String> map = KsqlConfig.parseStringAsMap(name, str);
      map.forEach((k, valueStr) -> {
        try {
          Double.parseDouble(valueStr);
        } catch (NumberFormatException e) {
          throw new ConfigException(name, valueStr, "Not a double");
        }
      });
    };
  }
@Test
  public void shouldParseDoubleValueInMap() {
    // Given:
    final Validator validator = ConfigValidators.mapWithDoubleValue();
    validator.ensureValid("propName", "foo:1.2,bar:3");
  }