@Test
  public void testHBaseServerBaseConstructor() {
    final Matcher<SpanData> hbaseServerBaseMatcher = allOf(hasName("HBaseServerBase.cxtor"),
      hasParentSpanId(NO_PARENT_ID), hasStatusWithCode(isOneOf(StatusCode.OK, StatusCode.ERROR)));
    assertThat("there should be a span from the HBaseServerBase constructor.", spans,
      hasItem(hbaseServerBaseMatcher));
    final List<SpanData> hbaseServerBaseSpans =
      spans.stream().filter(hbaseServerBaseMatcher::matches).collect(Collectors.toList());
    assertThat("there should be two spans from the HBaseServerBase constructor, one for the master"
      + " and one for the region server.", hbaseServerBaseSpans, hasSize(2));
    assertThat("both should show zookeeper interaction.", spans,
      hasItems(
        allOf(hasParentSpanId(hbaseServerBaseSpans.get(0)),
          hasName(containsString("RecoverableZookeeper."))),
        allOf(hasParentSpanId(hbaseServerBaseSpans.get(1)),
          hasName(containsString("RecoverableZookeeper.")))));
  }
Wait for the underlying cluster to come up -- defined by meta being available.
hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerInternalsTracing.java