Example #1
0
  public void testCloneDeepClonesPreviousAmendments() throws Exception {
    Amendment src = Fixtures.createAmendments("C", "B", "A");
    Amendment clone = src.clone();

    assertNotSame(
        "Previous amendment not cloned", src.getPreviousAmendment(), clone.getPreviousAmendment());
    assertNotSame(
        "Previous previous amendment not cloned",
        src.getPreviousAmendment().getPreviousAmendment(),
        clone.getPreviousAmendment().getPreviousAmendment());
  }
Example #2
0
 public void testSetMemOnlyRecursiveToPreviousAmendments() throws Exception {
   Amendment amendment = Fixtures.createAmendments("C", "B", "A");
   amendment.setMemoryOnly(true);
   assertTrue(amendment.getPreviousAmendment().isMemoryOnly());
 }