public class MetricsTest {
@Test
public void testConnectionPoolMetrics() throws InterruptedException, ExecutionException, TimeoutException {
HttpClientBuilder<ByteBuf, ByteBuf> builder = RxContexts.newHttpClientBuilder("www.google.com", 80, RxContexts.DEFAULT_CORRELATOR);
HttpClient<ByteBuf, ByteBuf> client = builder.withConnectionPoolLimitStrategy(new CompositePoolLimitDeterminationStrategy(
new MaxConnectionsBasedStrategy(100), new MaxConnectionsBasedStrategy(100))).build();
HttpClientListener listener = HttpClientListener.newHttpListener("default");
client.subscribe(listener);
HttpClientRequest<ByteBuf> request = HttpClientRequest.createGet("/");
client.submit(request).flatMap(new Func1<HttpClientResponse<ByteBuf>, Observable<ByteBuf>>(){