void callReport(ListOfSpans spans) throws IOException {
    try (Buffer requestBody = new Buffer(); Buffer encodedMessage = new Buffer()) {
      requestBody.writeByte(0 /* compressedFlag */);

      ListOfSpans.ADAPTER.encode(encodedMessage, spans);
      requestBody.writeInt((int) encodedMessage.size());
      requestBody.writeAll(encodedMessage);

      Request request = new Request.Builder()
        .url(url(server, "/zipkin.proto3.SpanService/Report"))
        .addHeader("te", "trailers")
        .post(RequestBody.create(requestBody.snapshot(), MediaType.get("application/grpc")))
        .build();
      try (Response response = client.newCall(request).execute();
           BufferedSource responseBody = response.body().source()) {

        // We expect this is a valid gRPC over HTTP2 response (Length-Prefixed-Message).
        // See https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#responses
        byte compressedFlag = responseBody.readByte();
        long messageLength = responseBody.readInt() & 0xffffffffL;
        assertThat(responseBody.exhausted()).isTrue(); // We expect a single response

        // Now, verify the Length-Prefixed-Message
        assertThat(compressedFlag).isZero(); // server didn't compress
        assertThat(messageLength).isZero(); // there are no fields in ReportResponse
      }
    }
  }
This tests that we accept messages constructed by other clients.
zipkin-server/src/test/java/zipkin2/server/internal/ITZipkinGrpcCollector.java