@Test
  public void test() throws Exception {
    TestCluster testCluster = new TestCluster();

    try {
      PregelixJob job = new PregelixJob(PageRankVertex.class.getName());
      job.setVertexClass(PageRankVertex.class);
      job.setVertexInputFormatClass(TextPageRankInputFormat.class);
      job.setVertexOutputFormatClass(SimplePageRankVertexOutputFormat.class);
      job.setMessageCombinerClass(PageRankVertex.SimpleSumCombiner.class);
      job.setNoramlizedKeyComputerClass(VLongNormalizedKeyComputer.class);
      FileInputFormat.setInputPaths(job, INPUTPATH);
      FileOutputFormat.setOutputPath(job, new Path(OUTPUTPAH));
      job.getConfiguration().setLong(PregelixJob.NUM_VERTICE, 20);
      job.setCheckpointHook(ConservativeCheckpointHook.class);
      job.setFixedVertexValueSize(true);
      job.setIterationCompleteReporterHook(FailureInjectionIterationCompleteHook.class);

      testCluster.setUp();
      Driver driver = new Driver(PageRankVertex.class);
      driver.runJob(job, "127.0.0.1", PregelixHyracksIntegrationUtil.TEST_HYRACKS_CC_CLIENT_PORT);

      PregelixTestUtils.compareWithResultDir(new File(EXPECTEDPATH), new File(OUTPUTPAH));
    } catch (Exception e) {
      PregelixHyracksIntegrationUtil.shutdownNC2();
      testCluster.cleanupHDFS();
      throw e;
    }
  }