public static Object parse(Payload payload) {
        Class classType = PayloadRegistry.getClassByType(payload.getMetadata().getType());
        if (classType != null) {
            ByteString byteString = payload.getBody().getValue();
            ByteBuffer byteBuffer = byteString.asReadOnlyByteBuffer();
            Object obj = JacksonUtils.toObj(new ByteBufferBackedInputStream(byteBuffer), classType);
            if (obj instanceof Request) {
                ((Request) obj).putAllHeader(payload.getMetadata().getHeadersMap());
            }
            return obj;
        } else {
            throw new RemoteException(NacosException.SERVER_ERROR,
                    "Unknown payload type:" + payload.getMetadata().getType());
        }
    }
@Test
    void testParse() {
        Payload requestPayload = GrpcUtils.convert(request);
        
        ServiceQueryRequest request = (ServiceQueryRequest) GrpcUtils.parse(requestPayload);
        assertEquals(this.request.getHeaders(), request.getHeaders());
        assertEquals(this.request.getCluster(), request.getCluster());
        assertEquals(this.request.isHealthyOnly(), request.isHealthyOnly());
        assertEquals(this.request.getNamespace(), request.getNamespace());
        
        Payload responsePayload = GrpcUtils.convert(response);
        ClientConfigMetricResponse response = (ClientConfigMetricResponse) GrpcUtils.parse(responsePayload);
        assertEquals(this.response.getMetrics(), response.getMetrics());
        
    }