docs: public void register(Object object) {
  
          Class<?> listenerClass = object.getClass();
  
          if(!Modifier.isPublic(listenerClass.getModifiers())){
              throw new IllegalArgumentException(String.format(Locale.ENGLISH,
                      "Event Subscriber class %s needs to be public",
                      listenerClass.getName()));
          }
  
          List<SubscriberMethod> methods = new ArrayList<SubscriberMethod>();
          // Do loop to traverse the class hierarchy looking for @Subscribe methods. Using
          // listenerClass.getMethods() seems preferable as it should include inherited public
          // methods, but it does not seem to work for some of the mock(listener) types used in
          // the tests (e.g. mock(StrategyListener.class)).
          do {
              for (Method m : listenerClass.getDeclaredMethods()) {
                  if (m.isAnnotationPresent(com.cloudant.sync.event.Subscribe.class)) {
  
                      if (!Modifier.isPublic(m.getModifiers())){
                          throw new IllegalArgumentException(String.format(Locale.ENGLISH,
                                  "Subscriber method %s#%s is required to be public",
                                  listenerClass.getName(), m.getName()));
                      }
  
                      Class[] params = m.getParameterTypes();
                      if (params.length == 1) {
                          if(!Notification.class.isAssignableFrom(params[0])){
                              throw new IllegalArgumentException(String.format(Locale.ENGLISH,
                                      "Subscriber method %s#%s parameter is required to be assignable %s",
                                      listenerClass.getName(),
                                      m.getName(),
                                      Notification.class.getCanonicalName()));
                          }
                          methods.add(new SubscriberMethod(m, params[0]));
                      } else {
                          throw new IllegalArgumentException(String.format(Locale.ENGLISH,
                                  "Subscriber method  %s#%s is required to have only 1 parameter",
                                  listenerClass.getName(),
                                  m.getName()));
                      }
                  }
              }
          } while ((listenerClass = listenerClass.getSuperclass()) != null);
  
          listeners.put(object, methods);
      }