@Test
public void getsSetCookieHeader() throws Exception {

    MultivaluedMap<String, Object> headers = new MultivaluedHashMap<>();
    List<Object> cookiesList = newArrayList(new NewCookie("name", "andrew"), new NewCookie("company", "codenvy", "/path", "codenvy.com", 1, "comment", 300, null, true, true));
    headers.put(SET_COOKIE, cookiesList);
    ResponseImpl response = new ResponseImpl(200, "foo", null, headers);
    Map<String, NewCookie> expectedCookies = ImmutableMap.of("name", new NewCookie("name", "andrew"),
                                                             "company", new NewCookie("company", "codenvy", "/path", "codenvy.com", 1, "comment", 300, null, true, true));
    assertEquals(expectedCookies, response.getCookies());
}