@Test
  public void testSubscribeWithWeakReference() {
    StringListener listener =
        new StringListener() {
          int cnt = 0;

          @Override
          public void onEvent(Event<String> event) {
            cnt++;
            if (cnt > 1) {
              fail("I should have been garbage collected by now");
            }
          }
        };
    applicationEventBus.subscribeWithWeakReference(listener);
    applicationEventBus.publish(this, "Hello World Application");
    listener = null;
    System.gc();
    applicationEventBus.publish(this, "Hello World Application");
  }