public static Matcher<SpanData> hasEvents(Matcher<Iterable<? super EventData>> matcher) {
    return new FeatureMatcher<SpanData, Iterable<? super EventData>>(matcher,
      "SpanData having events that", "events") {
      @Override
      protected Iterable<? super EventData> featureValueOf(SpanData item) {
        return item.getEvents();
      }
    };
  }
Helper methods for matching against instances of {@link SpanData}.
hbase-client/src/test/java/org/apache/hadoop/hbase/client/trace/hamcrest/SpanDataMatchers.java