### Question:
AlterStatementBuilder { public String buildWithSchema(Schema schema) throws UnsupportedTypeException { return buildWithSchemaInternal(new SchemaConverter(escapeColumns).toHiveSchema(schema)); } AlterStatementBuilder(String name, @Nullable String databaseName, String tableName, boolean escapeColumns); String buildWithLocation(Location location); String buildWithTableProperties(Map<String, String> tableProperties); String buildWithSchema(Schema schema); String buildWithSchema(String hiveSchema); String buildWithFileFormat(String fileFormat); String buildWithDelimiter(String delimiter); String buildWithFormats(String inputFormat, String outputFormat, String serde);  }### Answer:
@Test public void testWithSchema() throws Exception { Schema schema = Schema.recordOf( "stuff", Schema.Field.of("f1", Schema.of(Schema.Type.STRING)), Schema.Field.of("f2", Schema.of(Schema.Type.INT)), Schema.Field.of("f3", Schema.of(Schema.Type.DOUBLE)), Schema.Field.of("f4", Schema.of(Schema.Type.BOOLEAN)), Schema.Field.of("f5", Schema.of(Schema.Type.FLOAT)), Schema.Field.of("f6", Schema.of(Schema.Type.BYTES))); String expected = "ALTER TABLE dataset_xyz " + "REPLACE COLUMNS (f1 string, f2 int, f3 double, f4 boolean, f5 float, f6 binary)"; String actual = new AlterStatementBuilder("xyz", null, "dataset_xyz", false) .buildWithSchema(schema); Assert.assertEquals(expected, actual); expected = "ALTER TABLE dataset_xyz " + "REPLACE COLUMNS (`f1` string, `f2` int, `f3` double, `f4` boolean, `f5` float, `f6` binary)"; actual = new AlterStatementBuilder("xyz", null, "dataset_xyz", true) .buildWithSchema(schema); Assert.assertEquals(expected, actual); expected = "ALTER TABLE dataset_xyz " + "REPLACE COLUMNS (f1 string, f2 int, f3 double)"; actual = new AlterStatementBuilder("xyz", null, "dataset_xyz", true) .buildWithSchema("f1 string, f2 int, f3 double"); Assert.assertEquals(expected, actual); }