@Test
public void testCopyOf()  throws ValidationException {

    assertNull(Experiment.copyOf(null));
    final Experiment original =
        new Experiment(null, "experiment")
            .activate()
            .addTreatment("foo")
            .addOverride("override", "foo", "true")
            .allocate("foo", 10);
    final Experiment copy = Experiment.copyOf(original);
    assertFalse(original == copy);
    assertFalse(original.getTreatments().get(0) == copy.getTreatments().get(0));
    assertFalse(original.getAllocations().get(0) == copy.getAllocations().get(0));
    assertFalse(original.getOverrides().get(0) == copy.getOverrides().get(0));
    assertTrue(copy.getAllocations().get(0).getTreatment() == copy.getTreatments().get(0));
    assertTrue(copy.getOverrides().get(0).getTreatment() == copy.getTreatments().get(0));
}