@Test
public void testRun() throws Exception {

  Path input = getTestTempDirPath("input");
  Path output = getTestTempDirPath("output");
  Path seedsPath = getTestTempDirPath("seeds");
  List<VectorWritable> points = getPointsWritable(REFERENCE);
  List<VectorWritable> seeds = getPointsWritable(SEEDS);
  Configuration conf = getConfiguration();
  ClusteringTestUtils.writePointsToFile(points, true, new Path(input, "file1"), fs, conf);
  ClusteringTestUtils.writePointsToFile(seeds, true, new Path(seedsPath, "part-seeds"), fs, conf);
  String[] args = { optKey(DefaultOptionCreator.INPUT_OPTION), input.toString(),
      optKey(VectorDistanceSimilarityJob.SEEDS), seedsPath.toString(), optKey(DefaultOptionCreator.OUTPUT_OPTION),
      output.toString(), optKey(DefaultOptionCreator.DISTANCE_MEASURE_OPTION),
      EuclideanDistanceMeasure.class.getName() };
  ToolRunner.run(getConfiguration(), new VectorDistanceSimilarityJob(), args);
  int expectedOutputSize = SEEDS.length * REFERENCE.length;
  int outputSize = Iterables.size(new SequenceFileIterable<StringTuple, DoubleWritable>(new Path(output,
      "part-m-00000"), conf));
  assertEquals(expectedOutputSize, outputSize);
}