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

      throw new KsqlException(message, e);
    }
  }
@Test
  public void shouldThrowIfValueSchemaNameAndAvroSchemaNameProvided() {
    // When:
    final Exception e = assertThrows(
        KsqlException.class,
        () -> CreateSourceAsProperties.from(
            ImmutableMap.<String, Literal>builder()
                .put(VALUE_SCHEMA_FULL_NAME, new StringLiteral("value_schema"))
                .put(VALUE_AVRO_SCHEMA_FULL_NAME, new StringLiteral("value_schema"))
                .build())
    );

    // Then:
    assertThat(e.getMessage(), is("Cannot supply both 'VALUE_AVRO_SCHEMA_FULL_NAME' "
        + "and 'VALUE_SCHEMA_FULL_NAME' properties. Please only set 'VALUE_SCHEMA_FULL_NAME'."));
  }