### Question:
AlterStatementBuilder { public String buildWithFormats(String inputFormat, String outputFormat, String serde) { return startBuild() .append("SET FILEFORMAT INPUTFORMAT '") .append(inputFormat) .append("' OUTPUTFORMAT '") .append(outputFormat) .append("' SERDE '") .append(serde) .append("'") .toString(); } 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 testWithFormats() throws Exception { String expected = "ALTER TABLE dataset_xyz SET FILEFORMAT " + "INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' " + "OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' " + "SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'"; String actual = new AlterStatementBuilder("xyz", null, "dataset_xyz", true) .buildWithFormats("org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat", "org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat", "org.apache.hadoop.hive.serde2.avro.AvroSerDe"); Assert.assertEquals(expected, actual); }