@Test
public void testConstructorWithProvidedReplacement() {

	EmbeddedChannel channel = new EmbeddedChannel();
	channel.pipeline().addFirst(NettyPipeline.SslHandler, new ChannelHandlerAdapter() {
	});
	HttpClientOperations ops1 = new HttpClientOperations(() -> channel,
			ConnectionObserver.emptyListener(),
			ClientCookieEncoder.STRICT, ClientCookieDecoder.STRICT);
	ops1.followRedirectPredicate((req, res) -> true);
	ops1.started = true;
	ops1.retrying = true;
	ops1.redirecting = new RedirectClientException(new DefaultHttpHeaders().add(HttpHeaderNames.LOCATION, "/"));
	HttpClientOperations ops2 = new HttpClientOperations(ops1);
	assertSame(ops1.channel(), ops2.channel());
	assertSame(ops1.started, ops2.started);
	assertSame(ops1.retrying, ops2.retrying);
	assertSame(ops1.redirecting, ops2.redirecting);
	assertSame(ops1.redirectedFrom, ops2.redirectedFrom);
	assertSame(ops1.isSecure, ops2.isSecure);
	assertSame(ops1.nettyRequest, ops2.nettyRequest);
	assertSame(ops1.responseState, ops2.responseState);
	assertSame(ops1.followRedirectPredicate, ops2.followRedirectPredicate);
	assertSame(ops1.requestHeaders, ops2.requestHeaders);
}