@Test
  public void testBangCommand() throws Exception {
    try (Statement stmt = conTestDb.createStatement()) {
      stmt.execute("!ls --l");
      fail("statement should fail, allowing this would be bad security");
    } catch (HiveSQLException e) {
      assertTrue(e.getMessage().contains("cannot recognize input near '!'"));
    }
  }
This method tests whether while creating a new connection, the config
variables specified in the JDBC URI are properly set for the connection.
This is a test for HiveConnection#configureConnection.

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