@Test
    public void testBuildJsonMessageWithParam() {
        String jsonParam = "{\"text\":\"hello world\"}";

        DynamicMessage jsonMessage = JsonMessage.buildJsonMessage(jsonParam);
        assertEquals(GrpcConstants.JSON_DESCRIPTOR_PROTO_NAME, jsonMessage.getDescriptorForType().getFullName());

        Descriptors.FieldDescriptor fieldDescriptor = jsonMessage.getDescriptorForType().findFieldByName(GrpcConstants.JSON_DESCRIPTOR_PROTO_FIELD_NAME);
        assertTrue(jsonMessage.hasField(fieldDescriptor));

        String field = (String) jsonMessage.getField(fieldDescriptor);
        assertEquals(jsonParam, field);
    }
The Test Case For {@link JsonMessage}.
shenyu-protocol/shenyu-protocol-grpc/src/test/java/org/apache/shenyu/protocol/grpc/message/JsonMessageTest.java