@Override
    public void onEvent(PreEventContext context)
        throws MetaException, NoSuchObjectException, InvalidOperationException {
      if (throwExceptionAtCall) {
        throw new MetaException("Authorization fails");
      }
    }
Implementation of MetaStorePreEventListener that throws MetaException when configured in
its function onEvent().
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHmsServerAuthorization.java