### Question:
DependencyObjectHelper { public static <T> IDependencyObject<T> createFromSetterOnly( @NotNull final BiConsumer<Object, T> dependencySetter, @NotNull final T defaultValue ) { return createFromProperty( PropertyCreationHelper.create( Optional.empty(), Optional.of(dependencySetter), true ), defaultValue ); } private  DependencyObjectHelper(); static IDependencyObject<T> createFromValue(@Nullable T value); static IDependencyObject<T> transform(
      final IDependencyObject<I> inputDependency,
      final Function<I, T> getTransformer,
      final Function<T, I> setTransformer); static IDependencyObject<T> createFromGetterOnly(
      @NotNull final Function<Object, T> dependencyGetter,
      @NotNull final T defaultValue
    ); static IDependencyObject<T> createFromProperty(@NotNull Property<T> property, @Nullable T def); static IDependencyObject<T> createFromGetterOnly(
      @NotNull final Supplier<T> dependencyGetter,
      @NotNull final T defaultValue
    ); static IDependencyObject<T> createFromSetterOnly(
      @NotNull final BiConsumer<Object, T> dependencySetter,
      @NotNull final T defaultValue
    ); static IDependencyObject<T> createFromSetterOnly(
      @NotNull final Consumer<T> dependencySetter,
      @NotNull final T defaultValue
    ); static IDependencyObject<T> createFromSetterAndGetter(
      @NotNull final Function<Object, T> dependencyGetter,
      @NotNull final BiConsumer<Object, T> dependencySetter,
      @NotNull final T defaultValue
    ); static IDependencyObject<T> createFromSetterAndGetter(
      @NotNull final Supplier<T> dependencyGetter,
      @NotNull final Consumer<T> dependencySetter,
      @NotNull final T defaultValue
    );  }### Answer:
@Test public void createFromSetterOnly() { final DummyInjectionTarget target = new DummyInjectionTarget(); final LambdaWrapper wrapper = new LambdaWrapper(); final IDependencyObject<String> dep = DependencyObjectHelper.createFromSetterOnly(wrapper::setValue, "Default"); Assert.assertTrue(dep instanceof PropertyBasedDependencyObject); Assert.assertEquals("Default", dep.get(target)); Assert.assertEquals("Value", wrapper.getValue()); dep.set(target, "Set"); Assert.assertEquals("Default", dep.get(target)); Assert.assertEquals("Set", wrapper.getValue()); }
@Test public void createFromSetterOnly1() { final DummyInjectionTarget target = new DummyInjectionTarget(); final LambdaWrapper wrapper = new LambdaWrapper(); final IDependencyObject<String> dep = DependencyObjectHelper.createFromSetterOnly((c, o) -> wrapper.setValue(o), "Default"); Assert.assertTrue(dep instanceof PropertyBasedDependencyObject); Assert.assertEquals("Default", dep.get(target)); Assert.assertEquals("Value", wrapper.getValue()); dep.set(target, "Set"); Assert.assertEquals("Default", dep.get(target)); Assert.assertEquals("Set", wrapper.getValue()); }