diff --git a/pregelix/pregelix-dataflow/src/main/java/edu/uci/ics/pregelix/dataflow/context/PJobContext.java b/pregelix/pregelix-dataflow/src/main/java/edu/uci/ics/pregelix/dataflow/context/PJobContext.java
index 15836e6..0ddb7d5 100644
--- a/pregelix/pregelix-dataflow/src/main/java/edu/uci/ics/pregelix/dataflow/context/PJobContext.java
+++ b/pregelix/pregelix-dataflow/src/main/java/edu/uci/ics/pregelix/dataflow/context/PJobContext.java
@@ -36,7 +36,7 @@
                 fileRef.delete();
 
         iterationToFiles.clear();
-        appStateMap.remove(jobId);
+        appStateMap.clear();
         jobIdToMove.remove(jobId);
         jobIdToSuperStep.remove(jobId);
     }
diff --git a/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java b/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobConnectedComponentsTest.java
similarity index 97%
rename from pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java
rename to pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobConnectedComponentsTest.java
index 3f42c0d..65b9845 100644
--- a/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java
+++ b/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobConnectedComponentsTest.java
@@ -34,11 +34,11 @@
 import edu.uci.ics.pregelix.example.util.TestUtils;
 
 /**
- * This test case tests multi-user workload.
+ * This test case tests multi-user workload, using ConnectedComponents.
  * 
  * @author yingyib
  */
-public class MultiJobTest {
+public class MultiJobConnectedComponentsTest {
     private static String INPUTPATH = "data/webmapcomplex";
     private static String OUTPUTPAH = "actual/result";
     private static String OUTPUTPAH2 = "actual/result2";
diff --git a/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java b/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobPageRankTest.java
similarity index 65%
copy from pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java
copy to pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobPageRankTest.java
index 3f42c0d..cfd1b27 100644
--- a/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java
+++ b/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobPageRankTest.java
@@ -24,43 +24,40 @@
 
 import edu.uci.ics.pregelix.api.job.PregelixJob;
 import edu.uci.ics.pregelix.api.util.ConservativeCheckpointHook;
-import edu.uci.ics.pregelix.api.util.DefaultVertexPartitioner;
 import edu.uci.ics.pregelix.core.driver.Driver;
 import edu.uci.ics.pregelix.core.util.PregelixHyracksIntegrationUtil;
-import edu.uci.ics.pregelix.example.ConnectedComponentsVertex.SimpleConnectedComponentsVertexOutputFormat;
+import edu.uci.ics.pregelix.example.PageRankVertex.SimplePageRankVertexOutputFormat;
 import edu.uci.ics.pregelix.example.data.VLongNormalizedKeyComputer;
-import edu.uci.ics.pregelix.example.inputformat.TextConnectedComponentsInputFormat;
+import edu.uci.ics.pregelix.example.inputformat.TextPageRankInputFormat;
 import edu.uci.ics.pregelix.example.util.TestCluster;
 import edu.uci.ics.pregelix.example.util.TestUtils;
 
 /**
- * This test case tests multi-user workload.
+ * This test case tests multi-user workload, using PageRank.
  * 
  * @author yingyib
  */
-public class MultiJobTest {
-    private static String INPUTPATH = "data/webmapcomplex";
+public class MultiJobPageRankTest {
+    private static String INPUTPATH = "data/webmap";
     private static String OUTPUTPAH = "actual/result";
     private static String OUTPUTPAH2 = "actual/result2";
-    private static String EXPECTEDPATH = "src/test/resources/expected/ConnectedComponentsRealComplex";
+    private static String EXPECTEDPATH = "src/test/resources/expected/PageRankReal";
 
     @Test
     public void test() throws Exception {
         TestCluster testCluster = new TestCluster();
         try {
-            PregelixJob job = new PregelixJob(ConnectedComponentsVertex.class.getName());
-            job.setVertexClass(ConnectedComponentsVertex.class);
-            job.setVertexClass(ConnectedComponentsVertex.class);
-            job.setVertexInputFormatClass(TextConnectedComponentsInputFormat.class);
-            job.setVertexOutputFormatClass(SimpleConnectedComponentsVertexOutputFormat.class);
-            job.setMessageCombinerClass(ConnectedComponentsVertex.SimpleMinCombiner.class);
+            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);
-            job.setVertexPartitionerClass(DefaultVertexPartitioner.class);
-            job.setDynamicVertexValueSize(true);
             FileInputFormat.setInputPaths(job, INPUTPATH);
             FileOutputFormat.setOutputPath(job, new Path(OUTPUTPAH));
-            job.getConfiguration().setLong(PregelixJob.NUM_VERTICE, 23);
+            job.getConfiguration().setLong(PregelixJob.NUM_VERTICE, 20);
             job.setCheckpointHook(ConservativeCheckpointHook.class);
+            job.setFixedVertexValueSize(true);
 
             testCluster.setUp();
             Thread thread = new Thread(new Runnable() {
@@ -69,19 +66,17 @@
                 public void run() {
                     try {
                         Driver driver = new Driver(PageRankVertex.class);
-                        PregelixJob job2 = new PregelixJob(ConnectedComponentsVertex.class.getName());
-                        job2.setVertexClass(ConnectedComponentsVertex.class);
-                        job2.setVertexClass(ConnectedComponentsVertex.class);
-                        job2.setVertexInputFormatClass(TextConnectedComponentsInputFormat.class);
-                        job2.setVertexOutputFormatClass(SimpleConnectedComponentsVertexOutputFormat.class);
-                        job2.setMessageCombinerClass(ConnectedComponentsVertex.SimpleMinCombiner.class);
+                        PregelixJob job2 = new PregelixJob(PageRankVertex.class.getName());
+                        job2.setVertexClass(PageRankVertex.class);
+                        job2.setVertexInputFormatClass(TextPageRankInputFormat.class);
+                        job2.setVertexOutputFormatClass(SimplePageRankVertexOutputFormat.class);
+                        job2.setMessageCombinerClass(PageRankVertex.SimpleSumCombiner.class);
                         job2.setNoramlizedKeyComputerClass(VLongNormalizedKeyComputer.class);
-                        job2.setVertexPartitionerClass(DefaultVertexPartitioner.class);
-                        job2.setDynamicVertexValueSize(true);
                         FileInputFormat.setInputPaths(job2, INPUTPATH);
                         FileOutputFormat.setOutputPath(job2, new Path(OUTPUTPAH2));
-                        job2.getConfiguration().setLong(PregelixJob.NUM_VERTICE, 23);
+                        job2.getConfiguration().setLong(PregelixJob.NUM_VERTICE, 20);
                         job2.setCheckpointHook(ConservativeCheckpointHook.class);
+                        job2.setFixedVertexValueSize(true);
                         driver.runJob(job2, "127.0.0.1", PregelixHyracksIntegrationUtil.TEST_HYRACKS_CC_CLIENT_PORT);
                         TestUtils.compareWithResultDir(new File(EXPECTEDPATH), new File(OUTPUTPAH2));
                     } catch (Exception e) {
