@Test
public void createFromOptional()
{

    final DummyTestTarget testTarget = new DummyTestTarget();
    final Property<String> bothSet = PropertyCreationHelper.createFromOptional(o -> testTarget.getValueOne(), (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.createFromOptional(o -> testTarget.getValueOne(), null, false);
    Assert.assertEquals("Set", getterNoneNull.apply(new Object()).get());
    getterNoneNull.accept(new Object(), "NotSet");
    Assert.assertEquals("Set", testTarget.getValueOne());
    final Property<String> setterNoneNull = PropertyCreationHelper.createFromOptional(null, (c, o) -> testTarget.setValueOne(o), false);
    Assert.assertFalse(setterNoneNull.apply(new Object()).isPresent());
    setterNoneNull.accept(new Object(), "NotSet");
    Assert.assertEquals("NotSet", testTarget.getValueOne());
}