will(returnValue(null));
oneOf(requestMock).getHeaders(HttpHeaders.COOKIE);
will(returnValue(values.elements()));
}
});
ServerMessageContext context =
new ServerMessageContext(requestMock, responseMock, new DeploymentConfiguration());
HttpHeadersImpl headers = new HttpHeadersImpl(context);
Map<String, Cookie> cookies = headers.getCookies();
assertEquals(new Cookie("MyName", "MyValue", "/somewhere", null), cookies.get("MyName"));
assertEquals(new Cookie("MyOtherName", "MyOtherValue", "/else", "mydomain.com"), cookies
.get("MyOtherName"));