@Override
    public void preBatchMutate(ObserverContext<? extends RegionCoprocessorEnvironment> c,
      MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException {
      Mutation mut = miniBatchOp.getOperation(0);

      if (mut instanceof Delete) {
        List<Cell> cells = mut.getFamilyCellMap().get(test);
        Delete[] deletes = new Delete[] {
          // delete only 2 rows
          new Delete(row1).addColumns(test, dummy, cells.get(0).getTimestamp()),
          new Delete(row2).addColumns(test, dummy, cells.get(0).getTimestamp()), };
        LOG.info("Deleting:" + Arrays.toString(deletes));
        miniBatchOp.addOperationsFromCP(0, deletes);
      }
    }
Tests that added mutations from coprocessors end up in the WAL.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverForAddingMutationsFromCoprocessors.java