@Test
public void textPropertyCanWrapButton() {

  JButton button = new JButton("New Button");
  TextProperty textProperty = new TextProperty(button);
  CountListener listener = new CountListener();
  textProperty.addListener(listener);
  assertThat(textProperty.get()).isEqualTo("New Button");
  assertThat(listener.getCount()).isEqualTo(0);
  button.setText("Button text updated directly");
  assertThat(textProperty.get()).isEqualTo("Button text updated directly");
  assertThat(listener.getCount()).isEqualTo(1);
  textProperty.set("Button text updated via property");
  assertThat(button.getText()).isEqualTo("Button text updated via property");
  assertThat(listener.getCount()).isEqualTo(2);
}