@Before
  public void setup() throws IOException {
    try (Connection connection = ConnectionFactory.createConnection(UTIL.getConfiguration());
      Admin admin = connection.getAdmin()) {
      for (TableDescriptor htd : admin.listTableDescriptors()) {
        UTIL.deleteTable(htd.getTableName());
      }
    }
  }
RegionEndpoint to test metrics from endpoint calls
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorMetrics.java