altServer.stop();
}
@Test
public void useStaticSyntaxOnAlternativeHostAndPort() throws Exception {
WireMockTestClient defaultTestClient = new WireMockTestClient(defaultServer.port());
WireMockTestClient altTestClient = new WireMockTestClient(altServer.port());
String thisHostName = InetAddress.getLocalHost().getHostName();
WireMock.configureFor(thisHostName, altServer.port());
givenThat(get(urlEqualTo("/resource/on/other/address"))
.willReturn(aResponse()
.withStatus(206)));
assertThat(altTestClient.get("/resource/on/other/address").statusCode(), is(206));
assertThat(defaultTestClient.get("/resource/on/other/address").statusCode(), is(404));
}