RxEventBus { public <E> void post(@Nonnull E event, @Nullable Action1<E> unhandled) { if (getRefCount(event.getClass()) > 0) { subject.onNext(event); } else { if (unhandled != null) { unhandled.call(event); } } }  void post(@Nonnull E event, @Nullable Action1<E> unhandled); void post(@Nonnull E event); Subscription subscribe(@Nonnull final Class<E> clazz, @Nonnull Action1<E> handler, @Nonnull Scheduler scheduler); Subscription subscribe(@Nonnull Class<E> clazz, @Nonnull Action1<E> handler);  }
@Test public void post_unhandled_do_nothing() { Event event = new Event(); bus.post(event); assertEquals(new Event(0, false), event); }
@Test public void post_unhandled_call_unhandled_function() { Event event = new Event(); bus.post(event, unhandledAction); assertEquals(new Event(0, true), event); }