@SuppressWarnings("deprecation")
  @Test
  public void testQuarantineCorruptMobFile() throws Exception {
    TableName table = TableName.valueOf(name.getMethodName());
    try {
      setupMobTable(table);
      assertEquals(ROWKEYS.length, countRows());
      admin.flush(table);

      FileSystem fs = FileSystem.get(conf);
      Path mobFile = getFlushedMobFile(fs, table);
      admin.disableTable(table);
      // create new corrupt mob file.
      String corruptMobFile = createMobFileName(mobFile.getName());
      Path corrupt = new Path(mobFile.getParent(), corruptMobFile);
      TestHFile.truncateFile(fs, mobFile, corrupt);
      LOG.info("Created corrupted mob file " + corrupt);
      HBaseFsck.debugLsr(conf, CommonFSUtils.getRootDir(conf));
      HBaseFsck.debugLsr(conf, MobUtils.getMobHome(conf));

      // A corrupt mob file doesn't abort the start of regions, so we can enable the table.
      admin.enableTable(table);
      HBaseFsck res = HbckTestingUtil.doHFileQuarantine(conf, table);
      assertEquals(0, res.getRetCode());
      HFileCorruptionChecker hfcc = res.getHFilecorruptionChecker();
      assertEquals(4, hfcc.getHFilesChecked());
      assertEquals(0, hfcc.getCorrupted().size());
      assertEquals(0, hfcc.getFailures().size());
      assertEquals(0, hfcc.getQuarantined().size());
      assertEquals(0, hfcc.getMissing().size());
      assertEquals(5, hfcc.getMobFilesChecked());
      assertEquals(1, hfcc.getCorruptedMobFiles().size());
      assertEquals(0, hfcc.getFailureMobFiles().size());
      assertEquals(1, hfcc.getQuarantinedMobFiles().size());
      assertEquals(0, hfcc.getMissedMobFiles().size());
      String quarantinedMobFile = hfcc.getQuarantinedMobFiles().iterator().next().getName();
      assertEquals(corruptMobFile, quarantinedMobFile);
    } finally {
      cleanupTable(table);
    }
  }
This creates a table and then corrupts a mob file. Hbck should quarantine the file.
hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckMOB.java