Every related method accepts a "now" parameter. If provided, it will be used instead of the system time.
Not used by Browser for now, but with very detailed tests. Does not handle expirations yet.