TransformingDependencyObject implements IDependencyObject<T> { @Override public boolean requiresDataContext() { return inputDependency.requiresDataContext(); } TransformingDependencyObject(
      final IDependencyObject<I> inputDependency,
      final Function<I, T> getTransformer,
      final Function<T, I> setTransformer); @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 requiresDataContext() { final Property<String> properOne = new Property<>(Optional.empty(), Optional.empty(), false); final Property<String> properTwo = new Property<>(Optional.empty(), Optional.empty(), true); final IDependencyObject<String> propDepOne = new PropertyBasedDependencyObject<>(properOne, "Default"); final IDependencyObject<String> propDepTwo = new PropertyBasedDependencyObject<>(properTwo, "Default"); final IDependencyObject<String> targetOne = new TransformingDependencyObject<>(propDepOne, Function.identity(), Function.identity()); final IDependencyObject<String> targetTwo = new TransformingDependencyObject<>(propDepTwo, Function.identity(), Function.identity()); Assert.assertFalse(targetOne.requiresDataContext()); Assert.assertTrue(targetTwo.requiresDataContext()); }