final DefaultConnectionKeepAliveStrategy strategy =
(DefaultConnectionKeepAliveStrategy) spyHttpClientBuilderField("keepAliveStrategy", apacheBuilder);
final HttpContext context = mock(HttpContext.class);
final HttpResponse response = mock(HttpResponse.class);
when(response.headerIterator(HTTP.CONN_KEEP_ALIVE)).thenReturn(mock(HeaderIterator.class));
assertThat(strategy.getKeepAliveDuration(response, context)).isEqualTo(1000);
}
@Test