### Question:
SchemaUpdate implements UpdateSchema { @Override public UpdateSchema renameColumn(String name, String newName) { Types.NestedField field = schema.findField(name); Preconditions.checkArgument(field != null, "Cannot rename missing column: %s", name); Preconditions.checkArgument(!deletes.contains(field.fieldId()), "Cannot rename a column that will be deleted: %s", field.name()); int fieldId = field.fieldId(); Types.NestedField update = updates.get(fieldId); if (update != null) { updates.put(fieldId, Types.NestedField.required(fieldId, newName, update.type())); } else { updates.put(fieldId, Types.NestedField.required(fieldId, newName, field.type())); } return this; } SchemaUpdate(TableOperations ops);   SchemaUpdate(Schema schema, int lastColumnId); @Override UpdateSchema addColumn(String name, Type type); @Override UpdateSchema addColumn(String parent, String name, Type type); @Override UpdateSchema deleteColumn(String name); @Override UpdateSchema renameColumn(String name, String newName); @Override UpdateSchema updateColumn(String name, Type.PrimitiveType newType); @Override Schema apply(); @Override void commit();  }### Answer:
@Test public void testRenameMissingColumn() { AssertHelpers.assertThrows("Should reject rename missing column", IllegalArgumentException.class, "missing column: col", () -> { UpdateSchema update = new SchemaUpdate(SCHEMA, SCHEMA_LAST_COLUMN_ID); update.renameColumn("col", "fail"); } ); }