.setEntries(new ArrayList<SystemTableEntry>())
.build());
backupBuilder.setMetaTable(metaTable.toBackup());
backupBuilder.setSchemaTable(schemaTable.toBackup());
backupBuilder.setSystemTable(systemTable.toBackup());
final MetadataBackup backup = backupBuilder.build();
// make sure metadata key-value pairs are what we expect.
List<KeyValueBackupEntry> keyValues =
backup.getMetaTable().getTables().get("foo").getKeyValueBackup().getKeyValues();
assertEquals(1, keyValues.size());
assertEquals("key", keyValues.get(0).getKey());
assertArrayEquals(BYTES_VALUE, keyValues.get(0).getValue().array());
// make sure layouts are what we expect.
List<TableLayoutBackupEntry> layoutBackups =
backup.getMetaTable().getTables().get("foo").getTableLayoutsBackup().getLayouts();
assertEquals(1, layoutBackups.size());
assertEquals(updatedLayout.getDesc(), layoutBackups.get(0).getLayout());
// Delete the entries for "foo" from the meta table.
metaTable.deleteTable("foo");