@Test
public void hasChanged()
{

    final IDependencyObject<String> input = new StaticDependencyObject<>("Input");
    final IDependencyObject<String> target = new TransformingDependencyObject<>(input, s -> s.replace("In", "Out"), s -> s.replace("Out", "In"));
    Assert.assertTrue(target.hasChanged(new DummyInjectionTarget()));
    Assert.assertEquals("Output", target.get(new DummyInjectionTarget()));
    Assert.assertFalse(target.hasChanged(new DummyInjectionTarget()));
    target.set(new DummyInjectionTarget(), "Test");
    Assert.assertTrue(target.hasChanged(new DummyInjectionTarget()));
    Assert.assertEquals("Test", target.get(new DummyInjectionTarget()));
    Assert.assertFalse(target.hasChanged(new DummyInjectionTarget()));
    Assert.assertFalse(target.hasChanged(new DummyInjectionTarget()));
    target.set(new DummyInjectionTarget(), "Output");
    Assert.assertTrue(target.hasChanged(new DummyInjectionTarget()));
    Assert.assertTrue(target.hasChanged(new DummyInjectionTarget()));
    Assert.assertEquals("Input", input.get(new DummyInjectionTarget()));
    Assert.assertEquals("Output", target.get(new DummyInjectionTarget()));
    Assert.assertFalse(target.hasChanged(new DummyInjectionTarget()));
}