### Question:
CookieUtils { public MultiValueMap<String, String> normalize( final MultiValueMap<String, ResponseCookie> cookies ) { return cookies .entrySet() .stream() .flatMap(v1 -> v1.getValue().stream().map(v2 -> Map.entry(v1.getKey(), v2.getValue()))) .collect(StreamUtils.toMultiMap(Map.Entry::getKey, Map.Entry::getValue)); }  MultiValueMap<String, String> normalize(
        final MultiValueMap<String, ResponseCookie> cookies
    );  }### Answer:
@Test public void normalizeTest() { final MultiValueMap<String, ResponseCookie> cookies = new LinkedMultiValueMap<>(); cookies.add("foo", ResponseCookie.from("foo", "1").build()); cookies.add("foo", ResponseCookie.from("foo", "2").build()); cookies.add("bar", ResponseCookie.from("bar", "3").build()); final MultiValueMap<String, String> expected = new LinkedMultiValueMap<>(); expected.add("foo", "1"); expected.add("foo", "2"); expected.add("bar", "3"); final MultiValueMap<String, String> actual = CookieUtils.normalize(cookies); assertEquals(expected, actual); }