@Test
public void testAddToClasses() {

  GiraphConfiguration conf = new GiraphConfiguration();
  conf.setClasses("foo", If.class, A.class, B.class);
  ClassConfOption.addToClasses(conf, "foo", C.class, If.class);
  Class<?>[] klasses = conf.getClasses("foo");
  assertEquals(3, klasses.length);
  assertEquals(A.class, klasses[0]);
  assertEquals(B.class, klasses[1]);
  assertEquals(C.class, klasses[2]);
  ClassConfOption.addToClasses(conf, "bar", B.class, If.class);
  klasses = conf.getClasses("bar");
  assertEquals(1, klasses.length);
  assertEquals(B.class, klasses[0]);
}