docs: private void beforeSessionEvent() throws NewSessionException {
      RemoteProxy p = session.getSlot().getProxy();
      if (p instanceof TestSessionListener) {
        try {
          ((TestSessionListener) p).beforeSession(session);
        } catch (Exception e) {
          log.severe("Error running the beforeSessionListener : " + e.getMessage());
          e.printStackTrace();
          throw new NewSessionException("The listener threw an exception ( listener bug )", e);
        }
      }
    }