public static Matcher<SpanData> hasStatusWithCode(Matcher<StatusCode> matcher) {
    return new FeatureMatcher<SpanData, StatusCode>(matcher, "SpanData with StatusCode that",
      "statusWithCode") {
      @Override
      protected StatusCode featureValueOf(SpanData actual) {
        return actual.getStatus().getStatusCode();
      }
    };
  }
Helper methods for matching against instances of {@link SpanData}.
hbase-client/src/test/java/org/apache/hadoop/hbase/client/trace/hamcrest/SpanDataMatchers.java