OptionalProperty extends AbstractProperty<Optional<T>> implements ObservableOptional<T> { public final void setValue(@NotNull T value) { Optional<T> opt = get(); if (!opt.isPresent() || !opt.get().equals(value)) { set(Optional.of(value)); } }  final void setValue(@NotNull T value); final void clear(); final void setNullableValue(@Nullable T value); @NotNull @Override final ObservableBool isPresent(); @Override @NotNull final T getValue(); @Override @NotNull final T getValueOr(@NotNull T defaultValue); @Override @Nullable final T getValueOrNull();  }
@Test public void testSetValue() { OptionalProperty<String> optStringValue = OptionalValueProperty.of("Hello"); optStringValue.setValue("Goodbye"); assertThat(optStringValue.getValue()).isEqualTo("Goodbye"); }