anchor.diff:  
       @Override
       public void stop(CoprocessorEnvironment env) throws IOException {
  -        // do mothing
  +        // do nothing
       }
   
       @Override
  -    public void getSum(RpcController controller, SumRequest request, RpcCallback done) {
  +    public void getSum(RpcController controller, Sum.SumRequest request, RpcCallback<Sum.SumResponse> done) {
           Scan scan = new Scan();
           scan.addFamily(Bytes.toBytes(request.getFamily()));
           scan.addColumn(Bytes.toBytes(request.getFamily()), Bytes.toBytes(request.getColumn()));
  -        SumResponse response = null;
  +
  +        Sum.SumResponse response = null;
           InternalScanner scanner = null;
  +
           try {
               scanner = env.getRegion().getScanner(scan);
  -            List results = new ArrayList();
  +            List<Cell> results = new ArrayList<>();
               boolean hasMore = false;
  -                        long sum = 0L;
  -                do {
  -                        hasMore = scanner.next(results);
  -                        for (Cell cell : results) {
  -                            sum = sum + Bytes.toLong(CellUtil.cloneValue(cell));
  -                     }
  -                        results.clear();
  -                } while (hasMore);
  -
  -                response = SumResponse.newBuilder().setSum(sum).build();
  -
  +            long sum = 0L;
  +
  +            do {
  +                hasMore = scanner.next(results);
  +                for (Cell cell : results) {
  +                    sum = sum + Bytes.toLong(CellUtil.cloneValue(cell));
  +                }
  +                results.clear();
  +            } while (hasMore);
  +
  +            response = Sum.SumResponse.newBuilder().setSum(sum).build();
           } catch (IOException ioe) {
               ResponseConverter.setControllerException(controller, ioe);
           } finally {
  
positive.code: //HConnection connection = HConnectionManager.createConnection(conf);
  //HTableInterface table = connection.getTable("users");
  
  final SumRequest request = SumRequest.newBuilder().setFamily("salaryDet").setColumn("gross")
                              .build();
  try {
  Map<byte[], Long> results = table.CoprocessorService (SumService.class, null, null,
  new Batch.Call<SumService, Long>() {
      @Override
          public Long call(SumService aggregate) throws IOException {
  BlockingRpcCallback rpcCallback = new BlockingRpcCallback();
              aggregate.getSum(null, request, rpcCallback);
              SumResponse response = rpcCallback.get();
              return response.hasSum() ? response.getSum() : 0L;
          }
      });
      for (Long sum : results.values()) {
          System.out.println("Sum = " + sum);
      }
  } catch (ServiceException e) {
  e.printStackTrace();
  } catch (Throwable e) {
      e.printStackTrace();
  }
  
negative.code: +
  [source, java]
  ----
  public class SumEndPoint extends Sum.SumService implements Coprocessor, CoprocessorService {
  
      private RegionCoprocessorEnvironment env;
  
  