@Test
public void enhancedIsDirtyWorks() {

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