@SuppressWarnings("unchecked")
  private static void addRow(Integer col0, Integer col1, Integer col2,
      List<List<IntWritable>>... partitions) {
    for (List<List<IntWritable>> partition : partitions) {
      partition.add(Lists.newArrayList(col0 != null ? new IntWritable(col0) : null,
          col1 != null ? new IntWritable(col1) : null,
          col2 != null ? new IntWritable(col2) : null));
    }

  }
Sets up mock and spy objects used for testing.
@param partition The real partition containing row values.
@param orderByCol Index of column in the row used for separating ranges.
@param start Window definition.
@param end Window definition.
@param order Window definition.
@param cache BoundaryCache instance, it may come in various sizes.
@param readCounter counts how many times reading was invoked
@return Mocked PTFPartition instance and ValueBoundaryScanner spy.
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/udf/ptf/TestBoundaryCache.java