List of usage examples for org.apache.http.impl.nio.client HttpAsyncClients createMinimal
public static CloseableHttpAsyncClient createMinimal()
From source file:com.clxcommunications.xms.ApiConnectionTest.java
@Test public void canBuildWithAllCustoms() throws Exception { String token = TestUtils.freshToken(); String spid = TestUtils.freshServicePlanId(); URI url = URI.create("https://localhost:3000/basepath"); CloseableHttpAsyncClient client = HttpAsyncClients.createMinimal(); ApiConnection conn = ApiConnection.builder().token(token).servicePlanId(spid).endpoint(url) .callbackWrapper(CallbackWrapper.identity).prettyPrintJson(false).httpClient(client).build(); assertThat(conn.token(), is(token)); assertThat(conn.servicePlanId(), is(spid)); assertThat(conn.endpoint(), is(url)); assertThat(conn.callbackWrapper(), is(sameInstance(CallbackWrapper.identity))); assertThat(conn.prettyPrintJson(), is(false)); assertThat(conn.httpClient(), is(sameInstance((HttpAsyncClient) client))); }