assertEquals(200, resp.getStatusCode());
final String cookie = resp.headers.get("set-cookie");
assertNotNull(cookie);
// make a new request to / with cookie should return again the same cookie
MultiMap headers = new CaseInsensitiveMultiMap();
headers.add("cookie", cookie);
yokeAssert.request("GET", "/", headers, new Handler<Response>() {
@Override
public void handle(Response resp) {
// the session should be the same, so no set-cookie
assertEquals(200, resp.getStatusCode());
String nocookie = resp.headers.get("set-cookie");
assertNull(nocookie);
// end the session
MultiMap headers = new CaseInsensitiveMultiMap();
headers.add("cookie", cookie);
yokeAssert.request("GET", "/delete", headers, new Handler<Response>() {
@Override
public void handle(Response resp) {
// there should be a set-cookie with maxAge 0