@Test
public void listInvalidatedOnAdd() throws Exception {

  ObservableList<String> list = new ObservableList<>();
  CountListener listener = new CountListener();
  list.addListener(listener);
  assertThat(listener.getCount()).isEqualTo(0);
  list.add("A");
  assertThat(listener.getCount()).isEqualTo(1);
}