### Question:
PropertyCreationHelper { public static <T> Property<T> create( @NotNull final Optional<Function<Object, T>> getter, @NotNull final Optional<BiConsumer<Object, T>> setter, @NotNull final boolean requiresDataContext) { return new Property<>(getter, setter, requiresDataContext); } private  PropertyCreationHelper(); static Property<T> createFromStaticValue(@Nullable T value); static Property<T> createFromOptional(
      @Nullable final Function<Object, T> getter,
      @Nullable final BiConsumer<Object, T> setter,
      @NotNull final boolean requiresDataContext); static Property<T> create(
      @NotNull final Optional<Function<Object, T>> getter,
      @NotNull final Optional<BiConsumer<Object, T>> setter,
      @NotNull final boolean requiresDataContext); static Property<T> createFromNonOptional(
      @NotNull final Function<Object, T> getter,
      @NotNull final BiConsumer<Object, T> setter,
      @NotNull final boolean requiresDataContext); static Property<T> createFromName(@NotNull final Optional<String> getSetMethodName); @SuppressWarnings({"OptionalUsedAsFieldOrParameterType", "unchecked"}) static Property<T> createFromName(
      @NotNull final Optional<String> getMethodName,
      @NotNull final Optional<String> setMethodName);  }### Answer:
@Test public void create() { final DummyTestTarget testTarget = new DummyTestTarget(); final Property<String> bothSet = PropertyCreationHelper.create(Optional.of(o -> testTarget.getValueOne()), Optional.of((o, s) -> testTarget.setValueOne(s)), false); Assert.assertFalse(bothSet instanceof StaticValueProperty); Assert.assertEquals("One", bothSet.apply(new Object()).get()); bothSet.accept(new Object(), "Set"); Assert.assertEquals("Set", testTarget.getValueOne()); final Property<String> getterNoneNull = PropertyCreationHelper.create(Optional.of(o -> testTarget.getValueOne()), Optional.empty(), false); Assert.assertEquals("Set", getterNoneNull.apply(new Object()).get()); getterNoneNull.accept(new Object(), "NotSet"); Assert.assertEquals("Set", testTarget.getValueOne()); final Property<String> setterNoneNull = PropertyCreationHelper.create(Optional.empty(), Optional.of((c, o) -> testTarget.setValueOne(o)), false); Assert.assertFalse(setterNoneNull.apply(new Object()).isPresent()); setterNoneNull.accept(new Object(), "NotSet"); Assert.assertEquals("NotSet", testTarget.getValueOne()); }