@CanDistro
    @PutMapping(value = {"", "/instance"})
    @Secured(action = ActionTypes.WRITE)
    public ResponseEntity update(HttpServletRequest request) throws NacosException {
        String healthyString = WebUtils.optional(request, HEALTHY_KEY, StringUtils.EMPTY);
        if (StringUtils.isBlank(healthyString)) {
            healthyString = WebUtils.optional(request, VALID_KEY, StringUtils.EMPTY);
        }
        if (StringUtils.isBlank(healthyString)) {
            throw new IllegalArgumentException("Param 'healthy' is required.");
        }
        boolean health = ConvertUtils.toBoolean(healthyString);
        String serviceName = WebUtils.required(request, CommonParams.SERVICE_NAME);
        String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID);
        String clusterName = WebUtils
                .optional(request, CommonParams.CLUSTER_NAME, UtilsAndCommons.DEFAULT_CLUSTER_NAME);
        String ip = WebUtils.required(request, IP_KEY);
        int port = Integer.parseInt(WebUtils.required(request, PORT_KEY));
        getHealthOperator()
                .updateHealthStatusForPersistentInstance(namespaceId, serviceName, clusterName, ip, port, health);
        return ResponseEntity.ok("ok");
    }
@Test
    void testUpdate() {
        MockHttpServletRequest servletRequest = new MockHttpServletRequest();
        servletRequest.addParameter(CommonParams.SERVICE_NAME, "test");
        servletRequest.addParameter(RequestConstant.IP_KEY, "1.1.1.1");
        servletRequest.addParameter(RequestConstant.PORT_KEY, "8848");
        servletRequest.addParameter(RequestConstant.HEALTHY_KEY, "true");
        
        try {
            ResponseEntity responseEntity = healthController.update(servletRequest);
            assertEquals(200, responseEntity.getStatusCodeValue());
        } catch (NacosException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }