@Test
  public void testHRegionServerPreRegistrationInitialization() {
    final Matcher<SpanData> rsPreRegistrationInitializationMatcher =
      allOf(hasName("HRegionServer.preRegistrationInitialization"), hasParentSpanId(NO_PARENT_ID),
        hasStatusWithCode(isOneOf(StatusCode.OK, StatusCode.ERROR)));
    assertThat("there should be a span from the HRegionServer preRegistrationInitialization.",
      spans, hasItem(rsPreRegistrationInitializationMatcher));
    final SpanData rsPreRegistrationInitializationSpan =
      spans.stream().filter(rsPreRegistrationInitializationMatcher::matches).findAny()
        .orElseThrow(AssertionError::new);
    assertThat(
      "the HRegionServer preRegistrationInitialization span should show zookeeper interaction.",
      spans, hasItem(allOf(hasName(startsWith("RecoverableZookeeper.")),
        hasParentSpanId(rsPreRegistrationInitializationSpan))));
  }
Wait for the underlying cluster to come up -- defined by meta being available.
hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerInternalsTracing.java