@Test
    public void givenClients_whenBinary_thenBuildClient() throws Exception {
        HelloService.Iface client =
                ThriftClients.builder(Scheme.of(BINARY, SessionProtocol.HTTP), server.httpEndpoint())
                             .path("/hello")
                             .build(HelloService.Iface.class);
        assertThat(client.hello("Trustin")).isEqualTo("Hello, Trustin!");

        client = ThriftClients.builder(Scheme.of(TEXT, SessionProtocol.HTTP), server.httpEndpoint())
                              .path("/hello")
                              .build(HelloService.Iface.class);
        assertThat(client.hello("Trustin")).isEqualTo("Hello, Trustin!");
    }
Test of serialization format validation / detection based on HTTP headers.
thrift/thrift0.13/src/test/java/com/linecorp/armeria/server/thrift/ThriftSerializationFormatsTest.java