@Test
  public void testReplDumpResultSet() throws Exception {
    String tid =
        TestJdbcWithMiniHS2.class.getCanonicalName().toLowerCase().replace('.', '_') + "_"
            + System.currentTimeMillis();
    String testPathName = System.getProperty("test.warehouse.dir", "/tmp") + Path.SEPARATOR + tid;
    Path testPath = new Path(testPathName + Path.SEPARATOR
            + Base64.getEncoder().encodeToString(testDbName.toLowerCase().getBytes(StandardCharsets.UTF_8)));
    FileSystem fs = testPath.getFileSystem(new HiveConf());
    Statement stmt = conDefault.createStatement();
    try {
      stmt.execute("set hive.repl.rootdir = " + testPathName);
      ResultSet rs = stmt.executeQuery("repl dump " + testDbName);
      ResultSetMetaData rsMeta = rs.getMetaData();
      assertEquals(2, rsMeta.getColumnCount());
      int numRows = 0;
      while (rs.next()) {
        numRows++;
        URI uri = new URI(rs.getString(1));
        int notificationId = rs.getInt(2);
        assertNotNull(uri);
        assertEquals(testPath.toUri().getScheme(), uri.getScheme());
        assertEquals(testPath.toUri().getAuthority(), uri.getAuthority());
        // In test setup, we append '/next' to hive.repl.rootdir and use that as the dump location
        assertEquals(testPath.toUri().getPath() + "/next", uri.getPath());
        assertNotNull(notificationId);
      }
      assertEquals(1, numRows);
    } finally {
      // Clean up
      fs.delete(testPath, true);
    }
  }
Tests ADD JAR uses Hives ReflectionUtil.CONSTRUCTOR_CACHE

@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java