class CreateSourceProperties {

  public static CreateSourceProperties from(final Map<String, Literal> literals) {
    try {
      return new CreateSourceProperties(literals, DurationParser::parse);
    } catch (final ConfigException e) {
      final String message = e.getMessage().replace(
          "configuration",
          "property"
      );

      throw new KsqlException(message, e);
    }
  }

  @VisibleForTesting  CreateSourceProperties(
      final Map<String, Literal> originals,
      final Function<String, Duration> durationParser
  );

}