code: @SuppressWarnings("unchecked")
      static <T extends JUnitWatcher> Optional<T> getAttachedWatcher(Class<T> watcherType) {
          if (RunnerWatcher.class.isAssignableFrom(watcherType)) {
              synchronized(runnerWatcherLoader) {
                  for (RunnerWatcher watcher : runnerWatcherLoader) {
                      if (watcher.getClass() == watcherType) {
                          return Optional.of((T) watcher);
                      }
                  }
              }
          }
          return Optional.absent();
      }
docs: Get reference to an instance of the specified watcher type.
  
  @param <T> watcher type
  @param watcherType watcher type
  @return optional watcher instance