@Secured(resource = "naming/switches", action = ActionTypes.WRITE)
    @PutMapping("/switches")
    public Result<String> updateSwitch(UpdateSwitchForm updateSwitchForm) throws Exception {
        updateSwitchForm.validate();
        try {
            switchManager.update(updateSwitchForm.getEntry(), updateSwitchForm.getValue(), updateSwitchForm.getDebug());
        } catch (IllegalArgumentException e) {
            throw new NacosApiException(HttpStatus.INTERNAL_SERVER_ERROR.value(), ErrorCode.SERVER_ERROR,
                    e.getMessage());
        }
        
        return Result.success("ok");
    }
@Test
    void testUpdateSwitches() {
        UpdateSwitchForm updateSwitchForm = new UpdateSwitchForm();
        updateSwitchForm.setDebug(true);
        updateSwitchForm.setEntry("test");
        updateSwitchForm.setValue("test");
        
        try {
            Result<String> result = operatorControllerV2.updateSwitch(updateSwitchForm);
            assertEquals(ErrorCode.SUCCESS.getCode(), result.getCode());
            assertEquals("ok", result.getData());
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }