static ExtendedCellScannable createCell(final int index) {
    return new ExtendedCellScannable() {
      @Override
      public ExtendedCellScanner cellScanner() {
        return new ExtendedCellScanner() {
          @Override
          public ExtendedCell current() {
            // Fake out a Cell. All this Cell has is a value that is an int in size and equal
            // to the above 'index' param serialized as an int.
            return new ExtendedCell() {
              @Override
              public long heapSize() {
                return 0;
              }

              private final int i = index;

              @Override
              public byte[] getRowArray() {
                return null;
              }

              @Override
              public int getRowOffset() {
                return 0;
              }

              @Override
              public short getRowLength() {
                return 0;
              }

              @Override
              public byte[] getFamilyArray() {
                return null;
              }

              @Override
              public int getFamilyOffset() {
                return 0;
              }

              @Override
              public byte getFamilyLength() {
                return 0;
              }

              @Override
              public byte[] getQualifierArray() {
                return null;
              }

              @Override
              public int getQualifierOffset() {
                return 0;
              }

              @Override
              public int getQualifierLength() {
                return 0;
              }

              @Override
              public long getTimestamp() {
                return 0;
              }

              @Override
              public byte getTypeByte() {
                return 0;
              }

              @Override
              public long getSequenceId() {
                return 0;
              }

              @Override
              public byte[] getValueArray() {
                return Bytes.toBytes(this.i);
              }

              @Override
              public int getValueOffset() {
                return 0;
              }

              @Override
              public int getValueLength() {
                return Bytes.SIZEOF_INT;
              }

              @Override
              public int getSerializedSize() {
                return 0;
              }

              @Override
              public int getTagsOffset() {
                return 0;
              }

              @Override
              public int getTagsLength() {
                return 0;
              }

              @Override
              public byte[] getTagsArray() {
                return null;
              }

              @Override
              public Type getType() {
                return null;
              }

              @Override
              public void setSequenceId(long seqId) throws IOException {
              }

              @Override
              public void setTimestamp(long ts) throws IOException {
              }

              @Override
              public void setTimestamp(byte[] ts) throws IOException {
              }
            };
          }

          private boolean hasCell = true;

          @Override
          public boolean advance() {
            // We have one Cell only so return true first time then false ever after.
            if (!hasCell) {
              return hasCell;
            }

            hasCell = false;
            return true;
          }
        };
      }
    };
  }
@param index the index of the cell to use as its value
@return A faked out 'Cell' that does nothing but return index as its value
hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestHBaseRpcControllerImpl.java