From 3fd2ce5e44e7ed1e6b479655c78c2f38cda14d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Mon, 5 Feb 2024 17:51:00 +0800 Subject: [PATCH] =?UTF-8?q?OCT=201.=20=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E6=A1=86?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authentication/pojo/po/ResPermInfo.java | 4 + .../java/com/cmhi/cf/misc/HelperUtils.java | 4 +- .../restapi/pojo/po/OperationLogDetails.java | 7 +- .../pojo/vo/OperationLogDetailsResp.java | 4 + .../java/com/cmhi/cf/tools/ToolsTest.java | 15 +++ .../cf/common/TestBaseAuthentication.java | 9 ++ .../cf/controller/CommonFrameworkApiTest.java | 13 +-- .../cf/controller/OperationLogApiTest.java | 40 ++++++-- .../controller/PermissionManagerApiTest.java | 97 +++++++++++++++++++ 9 files changed, 166 insertions(+), 27 deletions(-) create mode 100644 src/test/utest/com/cmhi/cf/controller/PermissionManagerApiTest.java diff --git a/src/main/java/com/cmhi/cf/authentication/pojo/po/ResPermInfo.java b/src/main/java/com/cmhi/cf/authentication/pojo/po/ResPermInfo.java index ad54d27..eed1a6b 100644 --- a/src/main/java/com/cmhi/cf/authentication/pojo/po/ResPermInfo.java +++ b/src/main/java/com/cmhi/cf/authentication/pojo/po/ResPermInfo.java @@ -2,12 +2,16 @@ package com.cmhi.cf.authentication.pojo.po; import com.houkunlin.system.dict.starter.json.DictText; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; +import lombok.NoArgsConstructor; @Schema(name = "资源权限信息") @Data @Builder +@NoArgsConstructor +@AllArgsConstructor public class ResPermInfo { @Schema(description = "资源id") private Long id; diff --git a/src/main/java/com/cmhi/cf/misc/HelperUtils.java b/src/main/java/com/cmhi/cf/misc/HelperUtils.java index e24d7d6..3c9a90d 100644 --- a/src/main/java/com/cmhi/cf/misc/HelperUtils.java +++ b/src/main/java/com/cmhi/cf/misc/HelperUtils.java @@ -154,9 +154,7 @@ public class HelperUtils { private static Type createRespType(Class[] c) { if (c.length == 1) { - return JsonParameterizedType.make(ProtocolResp.class, - new Type[] {c[0]}, - ProtocolResp.class.getDeclaringClass()); + return createRespType(c[0]); } Stack> st = new Stack<>(); diff --git a/src/main/java/com/cmhi/cf/restapi/pojo/po/OperationLogDetails.java b/src/main/java/com/cmhi/cf/restapi/pojo/po/OperationLogDetails.java index 3e7119b..effde07 100644 --- a/src/main/java/com/cmhi/cf/restapi/pojo/po/OperationLogDetails.java +++ b/src/main/java/com/cmhi/cf/restapi/pojo/po/OperationLogDetails.java @@ -8,11 +8,13 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; @Schema(name = "系统操作日志详细信息") @EqualsAndHashCode(callSuper = true) @Data @AllArgsConstructor +@NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"id", "requestHeaders", "request", "result", "status", "message"}) public class OperationLogDetails extends BaseRespStatus { @@ -28,11 +30,6 @@ public class OperationLogDetails extends BaseRespStatus { @Schema(description = "操作返回结果") private String result; - public OperationLogDetails() { - this.setStatus(ErrorCode.ERR_OK.getCode()); - this.setMessage(new String[] {ErrorCode.ERR_OK.getDescription()}); - } - public OperationLogDetails(Long id, ErrorCode error) { this.id = id; this.setStatus(error.getCode()); diff --git a/src/main/java/com/cmhi/cf/restapi/pojo/vo/OperationLogDetailsResp.java b/src/main/java/com/cmhi/cf/restapi/pojo/vo/OperationLogDetailsResp.java index 48bbbec..28eda07 100644 --- a/src/main/java/com/cmhi/cf/restapi/pojo/vo/OperationLogDetailsResp.java +++ b/src/main/java/com/cmhi/cf/restapi/pojo/vo/OperationLogDetailsResp.java @@ -3,9 +3,11 @@ package com.cmhi.cf.restapi.pojo.vo; import com.cmhi.cf.restapi.pojo.base.BaseRespStatus; import com.cmhi.cf.restapi.pojo.po.OperationLogDetails; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; import java.util.List; @@ -13,6 +15,8 @@ import java.util.List; @Data @JsonPropertyOrder({"operationLog", "status", "message"}) @Builder +@AllArgsConstructor +@NoArgsConstructor public class OperationLogDetailsResp extends BaseRespStatus { private List operationLog; } diff --git a/src/test/java/com/cmhi/cf/tools/ToolsTest.java b/src/test/java/com/cmhi/cf/tools/ToolsTest.java index 78f5330..bb69d52 100644 --- a/src/test/java/com/cmhi/cf/tools/ToolsTest.java +++ b/src/test/java/com/cmhi/cf/tools/ToolsTest.java @@ -1,5 +1,9 @@ package com.cmhi.cf.tools; +import com.cmhi.cf.misc.HelperUtils; +import com.cmhi.cf.restapi.pojo.vo.OperationLogDetailsResp; +import com.cmhi.cf.restapi.pojo.vo.ProtocolResp; +import com.fasterxml.jackson.core.JsonProcessingException; import com.jayway.jsonpath.JsonPath; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; @@ -31,4 +35,15 @@ public class ToolsTest { log.info("{}: {}", i, UUID.randomUUID()); } } + + @Test + public void testJsonParse() throws JsonProcessingException { + final String json = """ + {"ver":1,"cryptoType":0,"timeStamp":1707125126312,"code":200,"msgContent":{"operationLog":[{"id":1,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707099837000,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707099837587,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]},{"id":3,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707099871624,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707099872211,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]},{"id":5,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707099938776,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707099939344,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]},{"id":7,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707099996621,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707099997215,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]},{"id":9,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707100787683,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707100788214,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]},{"id":11,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707100815424,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707100816011,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]},{"id":13,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707101105227,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707101105814,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]},{"id":15,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707118528139,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707118528658,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]},{"id":18,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707118643883,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707118644447,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]},{"id":20,"requestHeaders":"{\\"Content-Length\\":\\"162\\",\\"Content-Type\\":\\"application/json;charset=UTF-8\\"}","request":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707118819114,\\"msgContent\\":{\\"username\\":\\"admin\\",\\"password\\":\\"8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918\\"}}","result":"{\\"ver\\":1,\\"cryptoType\\":0,\\"timeStamp\\":1707118820570,\\"code\\":200,\\"msgContent\\":{\\"status\\":0,\\"message\\":[\\"成功\\"]}}","status":0,"message":["成功"]}],"status":0,"message":["成功"]}} + """; + + ProtocolResp resp = HelperUtils.jsonGetProtocolResp(json, new Class[] {OperationLogDetailsResp.class}); + + log.info("{}", resp); + } } diff --git a/src/test/utest/com/cmhi/cf/common/TestBaseAuthentication.java b/src/test/utest/com/cmhi/cf/common/TestBaseAuthentication.java index 5308e47..fad01d7 100644 --- a/src/test/utest/com/cmhi/cf/common/TestBaseAuthentication.java +++ b/src/test/utest/com/cmhi/cf/common/TestBaseAuthentication.java @@ -5,6 +5,7 @@ import com.cmhi.cf.authentication.pojo.vo.LoginResp; import com.cmhi.cf.misc.HelperUtils; import com.cmhi.cf.restapi.config.ProtoCryptoType; import com.cmhi.cf.restapi.config.ProtocolConfigure; +import com.cmhi.cf.restapi.pojo.base.BaseRespStatus; import com.cmhi.cf.restapi.pojo.dto.ProtocolReq; import com.cmhi.cf.restapi.pojo.vo.ProtocolResp; import com.cmhi.cf.restapi.service.ProtocolSecurityService; @@ -155,4 +156,12 @@ public abstract class TestBaseAuthentication { Assertions.assertNotNull(str); Assertions.assertFalse(str.isEmpty()); } + + public void AssertValidCommonResp(T resp) { + Assertions.assertNotNull(resp); + Assertions.assertNotNull(resp.getStatus()); + Assertions.assertNotNull(resp.getMessage()); + Assertions.assertNotEquals(resp.getMessage().length, 0); + Assertions.assertEquals(resp.getStatus(), ErrorCode.ERR_OK.getCode()); + } } diff --git a/src/test/utest/com/cmhi/cf/controller/CommonFrameworkApiTest.java b/src/test/utest/com/cmhi/cf/controller/CommonFrameworkApiTest.java index 83f7455..27e0f69 100644 --- a/src/test/utest/com/cmhi/cf/controller/CommonFrameworkApiTest.java +++ b/src/test/utest/com/cmhi/cf/controller/CommonFrameworkApiTest.java @@ -1,6 +1,5 @@ package com.cmhi.cf.controller; -import com.cmhi.cf.common.ErrorCode; import com.cmhi.cf.common.TestBaseAuthentication; import com.cmhi.cf.restapi.pojo.vo.VersionResp; import org.junit.jupiter.api.Assertions; @@ -18,12 +17,8 @@ public class CommonFrameworkApiTest extends TestBaseAuthentication { @Test void testGetVersion() throws Exception { VersionResp resp = (VersionResp) performanceRestful(RequestMethod.GET, null, "/api/version", new Class[]{VersionResp.class}); - Assertions.assertNotNull(resp); + AssertValidCommonResp(resp); Assertions.assertNotNull(resp.getVersion()); - Assertions.assertNotNull(resp.getStatus()); - Assertions.assertNotNull(resp.getMessage()); - Assertions.assertNotEquals(resp.getMessage().length, 0); - Assertions.assertEquals(resp.getStatus(), ErrorCode.ERR_OK.getCode()); Assertions.assertNotNull(resp.getVersion().getTagName()); AssertValidString(resp.getVersion().getCommitId()); @@ -36,12 +31,8 @@ public class CommonFrameworkApiTest extends TestBaseAuthentication { @Test void testGetVersionV2() throws Exception { VersionResp resp = (VersionResp) performanceRestful(RequestMethod.POST, null, "/api/version", new Class[]{VersionResp.class}); - Assertions.assertNotNull(resp); + AssertValidCommonResp(resp); Assertions.assertNotNull(resp.getVersion()); - Assertions.assertNotNull(resp.getStatus()); - Assertions.assertNotNull(resp.getMessage()); - Assertions.assertNotEquals(resp.getMessage().length, 0); - Assertions.assertEquals(resp.getStatus(), ErrorCode.ERR_OK.getCode()); Assertions.assertNotNull(resp.getVersion().getTagName()); AssertValidString(resp.getVersion().getCommitId()); diff --git a/src/test/utest/com/cmhi/cf/controller/OperationLogApiTest.java b/src/test/utest/com/cmhi/cf/controller/OperationLogApiTest.java index c76bc18..5896983 100644 --- a/src/test/utest/com/cmhi/cf/controller/OperationLogApiTest.java +++ b/src/test/utest/com/cmhi/cf/controller/OperationLogApiTest.java @@ -3,23 +3,35 @@ package com.cmhi.cf.controller; import com.cmhi.cf.common.ErrorCode; import com.cmhi.cf.common.TestBaseAuthentication; import com.cmhi.cf.restapi.pojo.base.BasePageResultResp; +import com.cmhi.cf.restapi.pojo.dto.OperationLogDetailsReq; import com.cmhi.cf.restapi.pojo.dto.OperationLogReq; import com.cmhi.cf.restapi.pojo.po.OperationLogSummary; +import com.cmhi.cf.restapi.pojo.vo.OperationLogDetailsResp; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.MethodOrderer; +import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.api.TestMethodOrder; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestMethod; +import java.util.ArrayList; import java.util.List; @ExtendWith({SpringExtension.class}) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) @Transactional +@TestInstance(TestInstance.Lifecycle.PER_CLASS) +@TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class OperationLogApiTest extends TestBaseAuthentication { + private final List optIdArray = new ArrayList<>(); + @Test + @Order(1) void testGetSummary() throws Exception { final long pageSize = 10L; final long pageNumber = 1L; @@ -33,11 +45,7 @@ public class OperationLogApiTest extends TestBaseAuthentication { new Class[] {BasePageResultResp.class, OperationLogSummary.class}); Assertions.assertNotNull(obj); BasePageResultResp resp = (BasePageResultResp) obj; - Assertions.assertNotNull(resp); - Assertions.assertNotNull(resp.getStatus()); - Assertions.assertNotNull(resp.getMessage()); - Assertions.assertNotEquals(resp.getMessage().length, 0); - Assertions.assertEquals(resp.getStatus(), ErrorCode.ERR_OK.getCode()); + AssertValidCommonResp(resp); Assertions.assertNotNull(resp.getItems()); Assertions.assertFalse(resp.getItems().getItems().isEmpty()); @@ -65,16 +73,32 @@ public class OperationLogApiTest extends TestBaseAuthentication { AssertValidString(o.getRequestIp()); AssertValidString(o.getHttpMethod()); AssertValidString(o.getHttpPath()); + + optIdArray.add(o.getId()); }); } @Test + @Order(2) void testGetDetails() throws Exception { + Assertions.assertFalse(optIdArray.isEmpty()); - } + OperationLogDetailsReq req = new OperationLogDetailsReq(optIdArray); - @Test - void testGetDetails_OperationLogServiceReturnsNoItems() throws Exception { + Object obj = performanceRestful(RequestMethod.POST, req, "/api/operation/details", + new Class[] {OperationLogDetailsResp.class}); + Assertions.assertNotNull(obj); + OperationLogDetailsResp resp = (OperationLogDetailsResp) obj; + AssertValidCommonResp(resp); + Assertions.assertNotNull(resp.getOperationLog()); + Assertions.assertFalse(resp.getOperationLog().isEmpty()); + resp.getOperationLog().forEach(k -> { + Assertions.assertEquals(k.getStatus(), ErrorCode.ERR_OK.getCode()); + AssertValidString(k.getRequest()); + AssertValidString(k.getResult()); + AssertValidString(k.getRequestHeaders()); + Assertions.assertNotNull(k.getId()); + }); } } diff --git a/src/test/utest/com/cmhi/cf/controller/PermissionManagerApiTest.java b/src/test/utest/com/cmhi/cf/controller/PermissionManagerApiTest.java new file mode 100644 index 0000000..3f62431 --- /dev/null +++ b/src/test/utest/com/cmhi/cf/controller/PermissionManagerApiTest.java @@ -0,0 +1,97 @@ +package com.cmhi.cf.controller; + +import com.cmhi.cf.authentication.pojo.vo.UserResPermInfoResp; +import com.cmhi.cf.common.TestBaseAuthentication; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.MethodOrderer; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.api.TestMethodOrder; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit.jupiter.SpringExtension; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestMethod; + +@ExtendWith({SpringExtension.class}) +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@Transactional +@TestInstance(TestInstance.Lifecycle.PER_CLASS) +@TestMethodOrder(MethodOrderer.OrderAnnotation.class) +class PermissionManagerApiTest extends TestBaseAuthentication { + @Test + void testGetCurrentUserResourcePermission() throws Exception { + UserResPermInfoResp resp = (UserResPermInfoResp) performanceRestful(RequestMethod.GET, null, "/api/permission/resourcePermission", + new Class[] {UserResPermInfoResp.class}); + AssertValidCommonResp(resp); + Assertions.assertNotNull(resp.getResPermission()); + AssertValidString(resp.getUserId()); + AssertValidString(resp.getUsername()); + + Assertions.assertFalse(resp.getResPermission().isEmpty()); + + resp.getResPermission().forEach(k -> { + Assertions.assertNotNull(k.getId()); + AssertValidString(k.getHttpMethod()); + AssertValidString(k.getPath()); + AssertValidString(k.getName()); + Assertions.assertNotNull(k.getResTypeId()); + Assertions.assertNotNull(k.getEnable()); + }); + } + + @Test + void testGetCurrentUserResourcePermission_AuthUsersServiceReturnsNull() throws Exception { + + } + + @Test + void testGetCurrentUserResourcePermission_UserServiceReturnsNoItems() throws Exception { + + } + + @Test + void testGetUserResourcePermission() throws Exception { + + } + + @Test + void testGetUserResourcePermission_UserServiceGetAccountUserByUidReturnsNull() throws Exception { + + } + + @Test + void testGetUserResourcePermission_UserServiceGetUserResourcePermReturnsNoItems() throws Exception { + + } + + @Test + void testGetAllRoles() throws Exception { + + } + + @Test + void testGetAllRoles_RoleMapperReturnsNoItems() throws Exception { + + } + + @Test + void testRegisterResource() throws Exception { + + } + + @Test + void testRegisterResource_UserServiceReturnsNoItems() throws Exception { + + } + + @Test + void testRemoveResourceById() throws Exception { + + } + + @Test + void testRemoveResourceById_UserServiceReturnsNoItems() throws Exception { + + } +}