### Question:
BlurInputFormat implements InputFormat<Text, BlurRecord> { @Override public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException { List<?> splits = new ArrayList<Object>(); Path[] paths = FileInputFormat.getInputPaths(job); for (Path path : paths) { com.nearinfinity.blur.mapreduce.lib.BlurInputFormat.findAllSegments((Configuration)job,path,splits); } return splits.toArray(new InputSplit[]{}); }  @Override InputSplit[] getSplits(JobConf job, int numSplits); @Override RecordReader<Text, BlurRecord> getRecordReader(InputSplit split, JobConf job, Reporter reporter);  }### Answer:
@Test public void testGetSplits() throws IOException { BlurInputFormat format = new BlurInputFormat(); JobConf job = new JobConf(new Configuration()); FileInputFormat.addInputPath(job, indexPath); InputSplit[] splits = format.getSplits(job, -1); for (int i = 0; i < splits.length; i++) { BlurInputSplit split = (BlurInputSplit) splits[i]; Path path = new Path(indexPath,BlurUtil.getShardName(BlurConstants.SHARD_PREFIX, i)); FileSystem fileSystem = path.getFileSystem(job); assertEquals(new BlurInputSplit(fileSystem.makeQualified(path), "_0", 0, Integer.MAX_VALUE), split); } }