@BeforeClass
  public static void setup() throws Exception {
    confOverlay.clear();
    confOverlay.put(HiveConf.ConfVars.HIVE_SERVER2_TRANSPORT_MODE.varname, "binary");
    confOverlay.put(HiveConf.ConfVars.HIVE_SERVER2_ENABLE_DOAS.varname, "false");
    Hs2ConnectionMetrics.setup();
  }
Test the connection metrics using BeeLine client, when HS2 is started in binary mode.
itests/hive-unit/src/test/java/org/apache/hive/jdbc/miniHS2/TestHs2ConnectionMetricsBinary.java