private CompletableFuture<Void> clearTablesAndNamespaces() {
    return deleteUserTables().thenCompose(_void -> deleteUserNamespaces());
  }
A {@link TestRule} that clears all user namespaces and tables {@link ExternalResource#before()
before} the test executes. Can be used in either the {@link Rule} or {@link ClassRule} positions.
Lazily realizes the provided {@link AsyncConnection} so as to avoid initialization races with
other {@link Rule Rules}. <b>Does not</b> {@link AsyncConnection#close() close()} provided
connection instance when finished.
</p>
Use in combination with {@link MiniClusterRule} and {@link ConnectionRule}, for example:

<pre>
{
  &#64;code
  public class TestMyClass {
    &#64;ClassRule
    public static final MiniClusterRule miniClusterRule = MiniClusterRule.newBuilder().build();

    private final ConnectionRule connectionRule =
      new ConnectionRule(miniClusterRule::createConnection);
    private final ClearUserNamespacesAndTablesRule clearUserNamespacesAndTablesRule =
      new ClearUserNamespacesAndTablesRule(connectionRule::getConnection);

    &#64;Rule
    public TestRule rule =
      RuleChain.outerRule(connectionRule).around(clearUserNamespacesAndTablesRule);
  }
}
</pre>
hbase-server/src/test/java/org/apache/hadoop/hbase/ClearUserNamespacesAndTablesRule.java