@Test
  public void testConnectInvalidDatabase() throws SQLException {
    assertThrows(HiveSQLException.class, () -> {
      DriverManager.getConnection("jdbc:hive2:///databasedoesnotexist", "", "");
    });
  }
Test {@link HiveStatement#executeAsync(String)} for an insert overwrite into a table
@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java