@Test
public void simpleWireMockTest() throws Exception {

  stubFor(get(urlEqualTo("/paver/v1/roads/test_road"))
      .willReturn(aResponse().withStatus(HttpStatus.SC_OK).withBody("{}")));
  stubFor(post(urlEqualTo("/onramp/v1/roads/test_road/messages"))
      .willReturn(aResponse().withStatus(HttpStatus.SC_OK).withBody(createStubResponse(3, true, "accepted: "))));
  String host = "localhost:" + wireMockRule.httpsPort();
  OnrampOptions options = OnrampOptions.builder()
      .host(host)
      .username("user")
      .password("pass")
      .roadName("test_road")
      .objectMapper(mapper)
      .tlsConfigFactory(TLSConfig.trustAllFactory())
      .build();
  try (CloseableFunction<TestMessage, CompletableFuture<StandardResponse>> function = underTest.newInstance(options, 1, 1, EnqueueBehaviour.COMPLETE_EXCEPTIONALLY)) {
    CompletableFuture<StandardResponse> result = function.apply(new TestMessage("foo"));
    StandardResponse response = result.get();
    assertThat(response.getTimestamp(), is(100L));
    assertThat(response.isSuccess(), is(true));
    assertThat(response.getMessage(), is("accepted: 0"));
  }
  verify(postRequestedFor(urlEqualTo("/onramp/v1/roads/test_road/messages"))
      .withRequestBody(equalTo("[{\"data\":\"foo\"}]")));
}