@Test
public void testRun() throws Exception {

  // seed
  jobRunner.runJob(new Configuration(), propertyMgt);
  // then test
  jobRunner.run(new Configuration(), propertyMgt);
  for (final Map.Entry<String, List<AnalyticItemWrapper<SimpleFeature>>> e : KMeansIterationsJobRunnerForTest.groups.entrySet()) {
    assertEquals(3, e.getValue().size());
    for (final AnalyticItemWrapper<SimpleFeature> newCentroid : e.getValue()) {
      assertEquals(2, newCentroid.getIterationID());
      // check to make sure there is no overlap of old and new IDs
      boolean b = false;
      for (final AnalyticItemWrapper<SimpleFeature> oldCentroid : KMeansIterationsJobRunnerForTest.deletedSet.get(
          e.getKey())) {
        b |= oldCentroid.getID().equals(newCentroid.getID());
      }
      assertFalse(b);
    }
  }
  for (final Map.Entry<String, List<AnalyticItemWrapper<SimpleFeature>>> e : KMeansIterationsJobRunnerForTest.deletedSet.entrySet()) {
    assertEquals(3, e.getValue().size());
    for (final AnalyticItemWrapper<SimpleFeature> oldCentroid : e.getValue()) {
      assertEquals(1, oldCentroid.getIterationID());
    }
  }
}