public <T> HttpRestResult<T> exchangeForm(String url, Header header, Query query, Map<String, String> bodyValues,
            String httpMethod, Type responseType) throws Exception {
        RequestHttpEntity requestHttpEntity = new RequestHttpEntity(
                header.setContentType(MediaType.APPLICATION_FORM_URLENCODED), query, bodyValues);
        return execute(url, httpMethod, requestHttpEntity, responseType);
    }
@Test
    void testExchangeForm() 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.exchangeForm("http://127.0.0.1:8848/nacos/test", header, Query.EMPTY,
                new HashMap<>(), "PUT", String.class);
        assertTrue(result.ok());
        assertEquals(Header.EMPTY, result.getHeader());
        assertEquals("test", result.getData());
        assertEquals(MediaType.APPLICATION_FORM_URLENCODED, header.getValue(HttpHeaderConsts.CONTENT_TYPE));
    }