code: private static int getTimeout(final Ticket ticket) {
          val ttl = ticket.getExpirationPolicy().getTimeToLive().intValue();
          if (ttl == 0) {
              return 1;
          }
          return ttl;
      }
docs: If not time out value is specified, expire the ticket immediately.
  
  @param ticket the ticket
  @return timeout in milliseconds.