InputSplit[] splits = inputFormat.getSplits(conf, numSplits);
for (int index = 0; index < numSplits; index++) {
InMemInputSplit split = (InMemInputSplit) splits[index];
InMemRecordReader reader = (InMemRecordReader) inputFormat.getRecordReader(
split, conf, null);
for (int tree = 0; tree < split.getNbTrees(); tree++) {
IntWritable key = reader.createKey();
NullWritable value = reader.createValue();
// reader.next() should return true until there is no tree left
assertEquals(tree < split.getNbTrees(), reader.next(key, value));
assertEquals(split.getFirstId() + tree, key.get());
}
}
}