private static T wrapExceptions <T>(RestSession session, Wrapped <T> wrapped)
        {
            T result = wrapped();

            session.logout();
            return(result);
        }
 private static void wrapExceptionsVoid(RestSession session, WrappedVoid wrapped)
 {
     wrapped();
     session.logout();
 }