### Question:
SchemaUpdate implements UpdateSchema { @Override public UpdateSchema requireColumn(String name) { internalUpdateColumnRequirement(name, false); return this; } SchemaUpdate(TableOperations ops);   SchemaUpdate(Schema schema, int lastColumnId); @Override SchemaUpdate allowIncompatibleChanges(); @Override UpdateSchema addColumn(String name, Type type, String doc); @Override UpdateSchema addColumn(String parent, String name, Type type, String doc); @Override UpdateSchema addRequiredColumn(String name, Type type, String doc); @Override UpdateSchema addRequiredColumn(String parent, String name, Type type, String doc); @Override UpdateSchema deleteColumn(String name); @Override UpdateSchema renameColumn(String name, String newName); @Override UpdateSchema requireColumn(String name); @Override UpdateSchema makeColumnOptional(String name); @Override UpdateSchema updateColumn(String name, Type.PrimitiveType newType); @Override UpdateSchema updateColumnDoc(String name, String doc); @Override UpdateSchema moveFirst(String name); @Override UpdateSchema moveBefore(String name, String beforeName); @Override UpdateSchema moveAfter(String name, String afterName); @Override UpdateSchema unionByNameWith(Schema newSchema); @Override Schema apply(); @Override void commit();  }### Answer:
@Test public void testRequireColumn() { Schema schema = new Schema(optional(1, "id", Types.IntegerType.get())); Schema expected = new Schema(required(1, "id", Types.IntegerType.get())); AssertHelpers.assertThrows("Should reject change to required if incompatible changes are not allowed", IllegalArgumentException.class, "Cannot change column nullability: id: optional -> required", () -> new SchemaUpdate(schema, 1).requireColumn("id")); new SchemaUpdate(expected, 1).requireColumn("id").apply(); Schema result = new SchemaUpdate(schema, 1) .allowIncompatibleChanges() .requireColumn("id") .apply(); Assert.assertEquals("Should update column to be required", expected.asStruct(), result.asStruct()); }