@PostMapping("/rule")
    public ShenyuAdminResult saveRule(@RequestBody @Valid @NotNull final DataPermissionDTO dataPermissionDTO) {
        return ShenyuAdminResult.success(ShenyuResultMessage.SAVE_SUCCESS, dataPermissionService.createRule(dataPermissionDTO));
    }
@Test
    public void saveRule() throws Exception {
        DataPermissionDTO dataPermissionDTO = new DataPermissionDTO();
        dataPermissionDTO.setDataId("testDataId");
        dataPermissionDTO.setUserId("testUserId");
        given(this.dataPermissionService.createRule(dataPermissionDTO)).willReturn(1);
        this.mockMvc.perform(MockMvcRequestBuilders.post("/data-permission/rule")
                .contentType(MediaType.APPLICATION_JSON)
                .content(GsonUtils.getInstance().toJson(dataPermissionDTO)))
                .andExpect(status().isOk())
                .andExpect(jsonPath("$.message", is(ShenyuResultMessage.SAVE_SUCCESS)))
                .andExpect(jsonPath("$.data", is(1)))
                .andReturn();
    }