public static List<UpdateRequirement> forCreateTable(List<MetadataUpdate> metadataUpdates) {
    Preconditions.checkArgument(null != metadataUpdates, "Invalid metadata updates: null");
    Builder builder = new Builder(null, false);
    builder.require(new UpdateRequirement.AssertTableDoesNotExist());
    metadataUpdates.forEach(builder::update);
    return builder.build();
  }
@Test
  public void tableAlreadyExists() {
    List<UpdateRequirement> requirements = UpdateRequirements.forCreateTable(ImmutableList.of());

    assertThatThrownBy(() -> requirements.forEach(req -> req.validate(metadata)))
        .isInstanceOf(CommitFailedException.class)
        .hasMessage("Requirement failed: table already exists");
  }