Added test code for storing and retrieving cookies