@Test
  public void testBackupDelete() throws Exception {
    try (BackupSystemTable table = new BackupSystemTable(conn)) {
      int n = 10;
      List<BackupInfo> list = createBackupInfoList(n);

      // Load data
      for (BackupInfo bc : list) {
        // Make sure we set right status
        bc.setState(BackupState.COMPLETE);
        table.updateBackupInfo(bc);
      }

      // Verify exists
      for (BackupInfo bc : list) {
        assertNotNull(table.readBackupInfo(bc.getBackupId()));
      }

      // Delete all
      for (BackupInfo bc : list) {
        table.deleteBackupInfo(bc.getBackupId());
      }

      // Verify do not exists
      for (BackupInfo bc : list) {
        assertNull(table.readBackupInfo(bc.getBackupId()));
      }

      cleanBackupTable();
    }

  }
Test cases for backup system table API
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupSystemTable.java