@Test
public void cannotSend() {

    client = new UnsignedXrayClient("http://localhost:" + (server.port() + 1234));
    assertThatThrownBy(() -> client.getSamplingRules(new GetSamplingRulesRequest()))
            .isInstanceOf(XrayClientException.class)
            .hasMessageContaining("Could not serialize and send request");
}