@Test(timeout = 10000) public void testStructuredLogging() throws Exception { final HelloService.Iface client = newClient(); client.hello("kawamuray"); final ThriftStructuredLog log = writtenLogs.take(); //assertThat(writtenLogs.size()).isEqualTo(1); assertThat(log.timestampMillis()).isGreaterThan(0); assertThat(log.responseTimeNanos()).isGreaterThanOrEqualTo(0); assertThat(log.thriftServiceName()).isEqualTo(HelloService.class.getCanonicalName()); assertThat(log.thriftMethodName()).isEqualTo("hello"); final ThriftCall call = log.thriftCall(); assertThat(call.header().name).isEqualTo("hello"); assertThat(call.header().type).isEqualTo(TMessageType.CALL); assertThat(call.args()).isEqualTo(new hello_args().setName("kawamuray")); final ThriftReply reply = log.thriftReply(); assertThat(reply.header().name).isEqualTo("hello"); assertThat(reply.header().type).isEqualTo(TMessageType.REPLY); assertThat(reply.header().seqid).isEqualTo(call.header().seqid); assertThat(reply.result()).isEqualTo(new hello_result().setSuccess("Hello kawamuray")); }