public static Matcher<SpanData> hasParentSpanId(Matcher<String> matcher) {
    return new FeatureMatcher<SpanData, String>(matcher, "SpanKind with a parentSpanId that",
      "parentSpanId") {
      @Override
      protected String featureValueOf(SpanData item) {
        return item.getParentSpanId();
      }
    };
  }
Helper methods for matching against instances of {@link SpanData}.
hbase-client/src/test/java/org/apache/hadoop/hbase/client/trace/hamcrest/SpanDataMatchers.java