### Question:
HiveObjectUtils { public static Table updateSerDeUrl(Table table, String parameter, String url) { updateSerDeUrl(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter, url); return table; } private  HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partition, String parameter); static Table updateSerDeUrl(Table table, String parameter, String url); static Partition updateSerDeUrl(Partition partition, String parameter, String url);  }### Answer:
@Test public void updateUrlInTable() { Table table = newTable(); table.getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); table.getSd().getSerdeInfo().getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); HiveObjectUtils.updateSerDeUrl(table, AVRO_SCHEMA_URL_PARAMETER, "updatedUrl"); assertThat(table.getParameters().get(AVRO_SCHEMA_URL_PARAMETER), is("updatedUrl")); assertThat(table.getSd().getSerdeInfo().getParameters().get(AVRO_SCHEMA_URL_PARAMETER), is(nullValue())); }
@Test public void updateUrlInPartition() { Partition partition = newPartition(); partition.getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); partition.getSd().getSerdeInfo().getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); HiveObjectUtils.updateSerDeUrl(partition, AVRO_SCHEMA_URL_PARAMETER, "updatedUrl"); assertThat(partition.getParameters().get(AVRO_SCHEMA_URL_PARAMETER), is("updatedUrl")); assertThat(partition.getSd().getSerdeInfo().getParameters().get(AVRO_SCHEMA_URL_PARAMETER), is(nullValue())); }