@Override
    public void preBatchMutate(ObserverContext<? extends RegionCoprocessorEnvironment> c,
      MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException {
      Mutation mut = miniBatchOp.getOperation(0);
      List<Cell> cells = mut.getFamilyCellMap().get(test);
      Put[] puts = new Put[] { new Put(Bytes.toBytes("cpPut"))
        .addColumn(test, dummy, cells.get(0).getTimestamp(), Bytes.toBytes("cpdummy"))
        .setTTL(mut.getTTL()) };
      LOG.info("Putting:" + Arrays.toString(puts));
      miniBatchOp.addOperationsFromCP(0, puts);
    }
Tests that added mutations from coprocessors end up in the WAL.
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverForAddingMutationsFromCoprocessors.java