public <T> HttpRestResult<T> putJson(String url, Header header, Query query, String body, Type responseType)
            throws Exception {
        RequestHttpEntity requestHttpEntity = new RequestHttpEntity(header.setContentType(MediaType.APPLICATION_JSON),
                query, body);
        return execute(url, HttpMethod.PUT, requestHttpEntity, responseType);
    }
@Test
    void testPutJson() throws Exception {
        when(requestClient.execute(any(), eq("PUT"), any())).thenReturn(mockResponse);
        when(mockResponse.getStatusCode()).thenReturn(200);
        when(mockResponse.getBody()).thenReturn(new ByteArrayInputStream("test".getBytes()));
        Header header = Header.newInstance().setContentType(MediaType.APPLICATION_XML);
        HttpRestResult<String> result = restTemplate.putJson("http://127.0.0.1:8848/nacos/test", header, "body", String.class);
        assertTrue(result.ok());
        assertEquals(Header.EMPTY, result.getHeader());
        assertEquals("test", result.getData());
        assertEquals(MediaType.APPLICATION_JSON, header.getValue(HttpHeaderConsts.CONTENT_TYPE));
    }