@Test
public void shouldIgnoreIncorrectlyFormattedCookies() throws IOException {
// given
CloseableHttpResponse httpClientResponse = mock(CloseableHttpResponse.class);
when(httpClientResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 500, "Server Error"));
when(httpClientResponse.getAllHeaders()).thenReturn(new org.apache.http.Header[]{
new BasicHeader("Set-Cookie", "valid_name=valid_value"),
new BasicHeader("Set-Cookie", "=invalid"),
new BasicHeader("Set-Cookie", "valid_name="),
new BasicHeader("Set-Cookie", "invalid"),