PubSub { public void subscribeMain(@NonNull Subscriber<T> sub) { synchronized (mainSubs) { mainSubs.add(sub); } }  void post(T obj); void subscribe(@NonNull Subscriber<T> sub); void subscribeMain(@NonNull Subscriber<T> sub); void unsubscribe(@NonNull Subscriber<T> sub); void unsubscribeMain(@NonNull Subscriber<T> sub);  }
@Test public void subscribeMain() { final PubSub<String> events = new PubSub<>(); events.subscribeMain((msg) -> assertEquals("BASE", msg)); events.post("BASE"); }