@Test
public void detectsMutationOfOriginal() {

    SampleClass testObject = new SampleClass();
    testObject.setFoo("bar");
    SampleClass enhanced = enhancer.enhance(testObject);
    ((Snapshot) enhanced).snapshot();
    assertDirty(enhanced, false);
    assertEquals("bar", enhanced.getFoo());
    testObject.setFoo(null);
    assertNull(enhanced.getFoo());
    assertDirty(enhanced, true);
    ((Snapshot) enhanced).snapshot();
    assertDirty(enhanced, false);
    testObject.setNumberObject(1234L);
    assertDirty(enhanced, true);
    assertEquals(1234L, enhanced.getNumberObject().longValue());
    ((Snapshot) enhanced).snapshot();
    assertDirty(enhanced, false);
}