@Test
public void createsCookieFromDefaultValueWhenCookieNotFoundInRequest() throws Exception {

    when(cookieParam.value()).thenReturn("no cookie");
    when(parameter.getParameterClass()).thenReturn((Class)Cookie.class);
    when(parameter.getDefaultValue()).thenReturn("default_cookie=xxx");
    Cookie resolvedCookie = (Cookie)cookieParameterResolver.resolve(parameter, applicationContext);
    assertEquals("default_cookie", resolvedCookie.getName());
    assertEquals("xxx", resolvedCookie.getValue());
}