public <
                    M extends MessageHeaders<EmptyRequestBody, P, EmptyMessageParameters>,
                    P extends ResponseBody>
            CompletableFuture<P> sendRequest(String targetAddress, int targetPort, M messageHeaders)
                    throws IOException {
        return sendRequest(
                targetAddress,
                targetPort,
                messageHeaders,
                EmptyMessageParameters.getInstance(),
                EmptyRequestBody.getInstance());
    }
@Test
    void testInvalidVersionRejection() throws Exception {
        try (final RestClient restClient =
                new RestClient(new Configuration(), Executors.directExecutor())) {
            assertThatThrownBy(
                            () ->
                                    restClient.sendRequest(
                                            unroutableIp,
                                            80,
                                            new TestMessageHeaders(),
                                            EmptyMessageParameters.getInstance(),
                                            EmptyRequestBody.getInstance(),
                                            Collections.emptyList(),
                                            RuntimeRestAPIVersion.V0))
                    .as("The request should have been rejected due to a version mismatch.")
                    .isInstanceOf(IllegalArgumentException.class);
        }
    }