@SuppressWarnings("unchecked")
  public static <E> void notifyAll(E event) {
    Preconditions.checkNotNull(event, "Cannot notify listeners for a null event.");

    Queue<Listener<?>> list = LISTENERS.get(event.getClass());
    if (list != null) {
      for (Listener<?> value : list) {
        Listener<E> listener = (Listener<E>) value;
        listener.notify(event);
      }
    }
  }
@Test
  public void testEvent2() {
    Event2 e2 = new Event2();

    Listeners.notifyAll(e2);

    assertThat(TestListener.get().e2).isEqualTo(e2);
  }