@Test
public void testBindBidirectionalWithConverter() {

  // given
  Property<String> str = new SimpleStringProperty("-42");
  Property<Number> num = new SimpleDoubleProperty(1.23);
  // when
  PropertyUtils.bindBidirectionalWithConverter(str, num, Double::parseDouble, Object::toString);
  // then (initial conditions)
  assertAll(
      () -> assertEquals("1.23", str.getValue(), "String was not set correctly"),
      () -> assertEquals(1.23, num.getValue().doubleValue(), "Binding target should not have changed")
  );
  // when changing one value
  str.setValue("89");
  // then
  assertEquals(89, num.getValue().doubleValue(), "Number was not set correctly");
  // when changing the other value
  num.setValue(10.01);
  // then
  assertEquals("10.01", str.getValue(), "String was not set correctly");
}