public static CheckAndMutateResult getCheckAndMutateResult(
    ClientProtos.MutateResponse mutateResponse, CellScanner cells) throws IOException {
    boolean success = mutateResponse.getProcessed();
    Result result = null;
    QueryMetrics metrics = null;
    if (mutateResponse.hasResult()) {
      result = ProtobufUtil.toResult(mutateResponse.getResult(), cells);
    }

    if (mutateResponse.hasMetrics()) {
      metrics = ProtobufUtil.toQueryMetrics(mutateResponse.getMetrics());
    }

    return new CheckAndMutateResult(success, result).setMetrics(metrics);
  }
Create a CheckAndMutateResult object from a protocol buffer MutateResponse
@return a CheckAndMutateResult object
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ResponseConverter.java