@Test
public void simpleReceiverWorks() throws Exception {

  ListenerManager listeners = new ListenerManager();
  IntReceiver intReceiver = new IntReceiver();
  IntValueProperty intProperty = new IntValueProperty(10);
  listeners.listen(intProperty, intReceiver);
  assertThat(intReceiver.myInvalidationCount).isEqualTo(0);
  assertThat(intReceiver.myLastValue).isEqualTo(0);
  intProperty.set(20);
  assertThat(intReceiver.myInvalidationCount).isEqualTo(1);
  assertThat(intReceiver.myLastValue).isEqualTo(20);
  intProperty.set(20);
  assertThat(intReceiver.myInvalidationCount).isEqualTo(1);
  assertThat(intReceiver.myLastValue).isEqualTo(20);
  intProperty.set(30);
  assertThat(intReceiver.myInvalidationCount).isEqualTo(2);
  assertThat(intReceiver.myLastValue).isEqualTo(30);
}