PropertyBasedDependencyObject implements IDependencyObject<T> { @Override public void set(@Nullable final Object context, @Nullable final T value) { property.accept(context, value); } PropertyBasedDependencyObject(@NotNull final Property<T> property, @Nullable final T def); @Override boolean requiresDataContext(); @Nullable @Override T get(@Nullable final Object context); @Override void set(@Nullable final Object context, @Nullable final T value); @Override boolean hasChanged(@Nullable final Object context);  }
@Test public void set() { final Property<String> targetOne = new StaticValueProperty<>("Static"); final IDependencyObject<String> depOne = new PropertyBasedDependencyObject<>(targetOne, "Default"); Assert.assertEquals("Static", depOne.get(new DummyInjectionTarget())); depOne.set(new DummyInjectionTarget(), "Changed"); final Optional<String> result = targetOne.apply(new Object()); Assert.assertTrue(result.isPresent()); Assert.assertEquals("Changed", result.get()); }