### Question:
SimpleHttpRequest { @SuppressWarnings("unchecked") public T execute() { WebTarget webTarget = client.target(uri).path(path); queryParams.forEach(webTarget::queryParam); try { if (outputType == Response.class) { return (T) webTarget.request(mediaType) .method(method, Entity.entity(entity, mediaType), Response.class); } else { return webTarget.request(mediaType).method(method, Entity.entity(entity, mediaType), outputType); } } catch (ProcessingException e) { throw new WebApplicationException(e); } } private  SimpleHttpRequest(final Client client, final Class<T> outputType); @SuppressWarnings("unchecked") T execute();  }### Answer:
@Test public void testSimpleResponse() { final Builder<Response> builder = SimpleHttpClient.clientBuilder() .hostnameVerifier(UntrustedSSL.getHostnameVerifier()) .sslContext(UntrustedSSL.getSSLContext()).provider(GsonProvider.class).build() .requestBuilder(Response.class); SimpleHttpRequest<Response> request = builder.uri(getBaseUri()).path("simple") .mediaType(MediaType.TEXT_PLAIN_TYPE).method(HttpMethod.POST).entity("input").build(); Response response = request.execute(); assertThat(response.getStatus(), is(200)); }
@Test public void testKeystoneTokenGetter() { final Builder<KeystoneToken> builder = SimpleHttpClient.clientBuilder() .hostnameVerifier(UntrustedSSL.getHostnameVerifier()) .sslContext(UntrustedSSL.getSSLContext()).provider(GsonProvider.class).build() .requestBuilder(KeystoneToken.class); SimpleHttpRequest<KeystoneToken> request = builder.uri(getBaseUri()).path("keystone") .mediaType(MediaType.APPLICATION_JSON_TYPE).method(HttpMethod.POST).entity("input").build(); KeystoneToken response = request.execute(); assertThat(response.getToken().getRoles().size(), is(1)); assertThat(response.getToken().getRoles().get(0).getName(), is(ROLE.getName())); assertThat(response.getToken().getRoles().get(0).getId(), is(ROLE.getId())); }