static DatabaseInput toDatabaseInput(
      Namespace namespace, Map<String, String> metadata, boolean skipNameValidation) {
    DatabaseInput.Builder builder =
        DatabaseInput.builder().name(toDatabaseName(namespace, skipNameValidation));
    Map<String, String> parameters = Maps.newHashMap();
    metadata.forEach(
        (k, v) -> {
          if (GLUE_DESCRIPTION_KEY.equals(k)) {
            builder.description(v);
          } else if (GLUE_DB_LOCATION_KEY.equals(k)) {
            builder.locationUri(v);
          } else {
            parameters.put(k, v);
          }
        });

    return builder.parameters(parameters).build();
  }
@Test
  public void testToDatabaseInputEmptyLocation() {
    Map<String, String> properties =
        ImmutableMap.of(IcebergToGlueConverter.GLUE_DESCRIPTION_KEY, "description", "key", "val");
    DatabaseInput databaseInput =
        IcebergToGlueConverter.toDatabaseInput(Namespace.of("ns"), properties, false);
    assertThat(databaseInput.locationUri()).as("Location should not be set").isNull();
    assertThat(databaseInput.description())
        .as("Description should be set")
        .isEqualTo("description");
    assertThat(databaseInput.parameters())
        .as("Parameters should be set")
        .isEqualTo(ImmutableMap.of("key", "val"));
    assertThat(databaseInput.name()).as("Database name should be set").isEqualTo("ns");
  }