public static Matcher<SpanData> hasEnded() {
    return new TypeSafeMatcher<SpanData>() {
      @Override
      protected boolean matchesSafely(SpanData item) {
        return item.hasEnded();
      }

      @Override
      public void describeTo(Description description) {
        description.appendText("SpanData that hasEnded");
      }
    };
  }
Helper methods for matching against instances of {@link SpanData}.
hbase-client/src/test/java/org/apache/hadoop/hbase/client/trace/hamcrest/SpanDataMatchers.java