@SuppressWarnings("unchecked")
    @Override
    public void sendMessage(final P message) {
        try {
            if (message == null) {
                delegate().sendMessage(null);
                return;
            }

            String jsonFormat = JsonFormat.printer().includingDefaultValueFields().preservingProtoFieldNames()
                    .print((MessageOrBuilder) message);

            DynamicMessage respMessage = JsonMessage.buildJsonMessage(jsonFormat);
            LOG.debug("begin send json response");
            delegate().sendMessage((P) respMessage);
        } catch (InvalidProtocolBufferException e) {
            throw Status.INTERNAL.withDescription(e.getMessage()).asRuntimeException();
        }
    }
@Test
    public void sentMsgTest() {
        testJsonForwardingServerCall.sendMessage(new TestResponse("test-response"));
    }