private void assertErrorContains(SQLException e, String deniedErr) {
    if(!e.getMessage().contains(deniedErr)) {
      fail("Exception message [" + e.getMessage() + "] does not contain [" + deniedErr + "]");
    }
  }
Call the HS2 metadata api's with authorizer disallowing those calls
@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/authorization/TestJdbcMetadataApiAuth.java