@PostMapping(value = "/raft")
    @Secured(action = ActionTypes.WRITE, resource = "nacos/admin")
    public RestResult<String> raftOps(@RequestBody Map<String, String> commands) {
        return protocolManager.getCpProtocol().execute(commands);
    }
@Test
    void testRaftOps() {
        Mockito.when(protocolManager.getCpProtocol()).thenAnswer(invocationOnMock -> {
            CPProtocol cpProtocol = Mockito.mock(CPProtocol.class);
            Mockito.when(cpProtocol.execute(Mockito.anyMap())).thenReturn(RestResultUtils.success("res"));
            return cpProtocol;
        });
        
        RestResult<String> result = coreOpsController.raftOps(new HashMap<>());
        assertEquals("res", result.getData());
    }