@Test public void polymorphicDistribution() {
    // Three catchers for related types String, Object, and Comparable<?>.
    // String isa Object
    // String isa Comparable<?>
    // Comparable<?> isa Object
    StringCatcher stringCatcher = new StringCatcher();

    final List<Object> objectEvents = new ArrayList<Object>();
    Object objCatcher = new Object() {
      @SuppressWarnings("unused")
      @Subscribe public void eat(Object food) {
        objectEvents.add(food);
      }
    };

    bus.register(stringCatcher);
    bus.register(objCatcher);

    // Two additional event types: Object and Comparable<?> (played by Integer)
    final Object OBJ_EVENT = new Object();
    final Object COMP_EVENT = new Integer(6);

    bus.post(EVENT);
    bus.post(OBJ_EVENT);
    bus.post(COMP_EVENT);

    // Check the StringCatcher...
    List<String> stringEvents = stringCatcher.getEvents();
    assertEquals("Only one String should be delivered.",
        1, stringEvents.size());
    assertEquals("Correct string should be delivered.",
        EVENT, stringEvents.get(0));

    // Check the Catcher<Object>...
    assertEquals("Three Objects should be delivered.",
        3, objectEvents.size());
    assertEquals("String fixture must be first object delivered.",
        EVENT, objectEvents.get(0));
    assertEquals("Object fixture must be second object delivered.",
        OBJ_EVENT, objectEvents.get(1));
    assertEquals("Comparable fixture must be thirdobject delivered.",
        COMP_EVENT, objectEvents.get(2));
  }
Tests that events are distributed to any subscribers to their type or any
supertype, including interfaces and superclasses.

Also checks delivery ordering in such cases.
otto/src/test/java/com/squareup/otto/BusTest.java