@Override
  public void getMin(RpcController controller, AggregateRequest request,
    RpcCallback<AggregateResponse> done) {
    AggregateResponse.Builder result = AggregateResponse.newBuilder();
    int min;
    boolean seenRegionBefore = seenRegion.put(env.getRegionInfo().getEncodedName(), true) != null;
    if (seenRegionBefore) {
      min = 10;
    } else {
      min = 2;
      seenRegion.put(env.getRegionInfo().getEncodedName(), true);
    }
    HBaseProtos.LongMsg longMsg = HBaseProtos.LongMsg.newBuilder().setLongMsg(min).build();
    result.addFirstPart(longMsg.toByteString());
    if (!seenRegionBefore) {
      result.setNextChunkStartRow(ByteString.copyFrom(env.getRegionInfo().getStartKey()));
    }
    done.run(result.build());
  }
Mocks the behavior of getMin() in the real AggregateImplementation. Makes some fake data to
send back some partial results, and then finally a complete result.
hbase-endpoint/src/test/java/org/apache/hadoop/hbase/client/MockPartialResultAggregateImplemention.java