when(mockExpressionManager.isExpression(HEADER_EXPIRY_DATE)).thenReturn(true);
when(mockExpressionManager.evaluate(HEADER_EXPIRY_DATE, mockMuleMessage)).thenReturn("Sun, 15 Dec 2013 16:00:00 GMT");
when(mockExpressionManager.parse(HEADER_SECURE, mockMuleMessage)).thenReturn("true");
when(mockExpressionManager.parse(HEADER_VERSION, mockMuleMessage)).thenReturn("1");
HttpResponse response = new HttpResponse();
httpResponseBuilder.setCookies(response, mockMuleMessage);
Map<String, String> responseCookies = getHeaderCookie(response.getHeaders());
assertNotNull(responseCookies);
assertEquals("userName=John_Galt; Version=1; Domain=localhost; Path=/; Secure; Expires=Sun, 15-Dec-2013 16:00:00 GMT", responseCookies.get("userName"));
}