private Scan serializeAndReturn(Configuration conf, Scan s) throws IOException {
    conf.set(TableInputFormat.SCAN, TableMapReduceUtil.convertScanToString(s));
    return TableSnapshotInputFormatImpl.extractScanFromConf(conf);
  }
Serializes and deserializes the given scan in the same manner that TableSnapshotInputFormat
does.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSnapshotInputFormat.java