diff --git a/gradle.properties b/gradle.properties index 6481bbad..9b250fba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,3 +12,4 @@ ssiLibVersion=0.0.19 wiremockVersion=3.4.2 commonsDaoVersion=0.0.5 appGroup=org.eclipse.tractusx.managedidentitywallets +mockInBeanVersion=boot2-v1.5.2 diff --git a/miw/build.gradle b/miw/build.gradle index 590d9f2f..9b70d146 100644 --- a/miw/build.gradle +++ b/miw/build.gradle @@ -70,7 +70,7 @@ dependencies { testImplementation group: 'org.mockito', name: 'mockito-inline', version: '5.2.0' testImplementation group: 'org.json', name: 'json', version: '20230227' testImplementation group: 'com.github.curious-odd-man', name: 'rgxgen', version: '1.4' - + testImplementation "com.teketik:mock-in-bean:${mockInBeanVersion}" } dependencyManagement { diff --git a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java index 5e9a7e34..5f1d85b7 100644 --- a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java +++ b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/utils/TestUtils.java @@ -33,6 +33,8 @@ import com.nimbusds.jwt.JWTClaimsSet; import com.nimbusds.jwt.SignedJWT; import lombok.SneakyThrows; +import org.apache.commons.lang3.RandomUtils; +import org.eclipse.tractusx.managedidentitywallets.commons.constant.CredentialStatus; import org.eclipse.tractusx.managedidentitywallets.commons.constant.StringPool; import org.eclipse.tractusx.managedidentitywallets.commons.exception.ForbiddenException; import org.eclipse.tractusx.managedidentitywallets.config.MIWSettings; @@ -41,10 +43,13 @@ import org.eclipse.tractusx.managedidentitywallets.dao.repository.WalletRepository; import org.eclipse.tractusx.managedidentitywallets.domain.SigningServiceType; import org.eclipse.tractusx.managedidentitywallets.dto.CreateWalletRequest; +import org.eclipse.tractusx.managedidentitywallets.dto.StatusListRequest; +import org.eclipse.tractusx.managedidentitywallets.revocation.RevocationClient; import org.eclipse.tractusx.ssi.lib.model.did.DidDocument; import org.eclipse.tractusx.ssi.lib.model.verifiable.Verifiable; import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredential; import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredentialBuilder; +import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredentialStatusList2021Entry; import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredentialSubject; import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredentialType; import org.jetbrains.annotations.NotNull; @@ -52,6 +57,7 @@ import org.json.JSONException; import org.json.JSONObject; import org.junit.jupiter.api.Assertions; +import org.mockito.Mockito; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; @@ -59,14 +65,19 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; +import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.net.URI; import java.time.Instant; import java.util.ArrayList; +import java.util.Base64; +import java.util.BitSet; import java.util.Date; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.UUID; +import java.util.zip.GZIPOutputStream; import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.ACCESS_TOKEN; import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.SCOPE; @@ -265,4 +276,135 @@ public static Map getCredentialAsMap(String holderBpn, String ho return objectMapper.readValue(credentialWithoutProof.toJson(), Map.class); } + + + public static VerifiableCredentialStatusList2021Entry getStatusListEntry(int index) { + return new VerifiableCredentialStatusList2021Entry(Map.of( + "id", "https://example.com/credentials/bpn123456789000/revocation/3#" + index, + "type", "BitstringStatusListEntry", + "statusPurpose", "revocation", + "statusListIndex", String.valueOf(index), + "statusListCredential", "https://example.com/credentials/bpn123456789000/revocation/3" + )); + } + + public static VerifiableCredentialStatusList2021Entry getStatusListEntry() { + int index = RandomUtils.nextInt(1, 100); + return new VerifiableCredentialStatusList2021Entry(Map.of( + "id", "https://example.com/credentials/bpn123456789000/revocation/3#" + index, + "type", "BitstringStatusListEntry", + "statusPurpose", "revocation", + "statusListIndex", String.valueOf(index), + "statusListCredential", "https://example.com/credentials/bpn123456789000/revocation/3" + )); + } + + public static void mockGetStatusListEntry(RevocationClient revocationClient, int statusIndex) { + //mock revocation service + Mockito.when(revocationClient.getStatusListEntry(Mockito.any(StatusListRequest.class), Mockito.any(String.class))).thenReturn(TestUtils.getStatusListEntry(statusIndex)); + } + + public static void mockGetStatusListEntry(RevocationClient revocationClient) { + //mock revocation service + Mockito.when(revocationClient.getStatusListEntry(Mockito.any(StatusListRequest.class), Mockito.any(String.class))).thenReturn(TestUtils.getStatusListEntry()); + } + + + public static void mockRevocationVerification(RevocationClient revocationClient, CredentialStatus credentialStatus) { + Mockito.when(revocationClient.verifyCredentialStatus(Mockito.any(), Mockito.anyString())).thenReturn(Map.of("status", credentialStatus.getName().toLowerCase())); + } + + @SneakyThrows + public static void mockGetStatusListVC(RevocationClient revocationClient, ObjectMapper objectMapper, String encodedList) { + String vcString = """ + { + "type": [ + "VerifiableCredential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/vc/status-list/2021/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "http://localhost:8085/api/v1/revocations/credentials/did:web:BPNL01-revocation", + "issuer": "did:key:z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce", + "issuanceDate": "2023-11-30T11:29:17Z", + "issued": "2023-11-30T11:29:17Z", + "validFrom": "2023-11-30T11:29:17Z", + "proof": { + "type": "JsonWebSignature2020", + "created": "2023-11-30T11:29:17Z", + "verificationMethod": "did:key:z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce#z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce", + "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..Iv6H_e4kfLj9dr0COsB2D_ZPpkMoFj3BVXW2iyKFC3q5QtvPWraWfzEDJ5fxtfd5bARJQIP6YhaXdfSRgJpACQ" + }, + "credentialSubject": { + "id": "did:key:z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce", + "type": "BitstringStatusList", + "statusPurpose": "revocation", + "encodedList": "##encodedList" + } + } + """; + vcString = vcString.replace("##encodedList", encodedList); + + VerifiableCredential verifiableCredential = new VerifiableCredential(objectMapper.readValue(vcString, Map.class)); + Mockito.when(revocationClient.getStatusListCredential(Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class))).thenReturn(verifiableCredential); + } + + @SneakyThrows + public static void mockGetStatusListVC(RevocationClient revocationClient, ObjectMapper objectMapper) { + String vcString = """ + { + "type": [ + "VerifiableCredential", + "StatusList2021Credential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/vc/status-list/2021/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "http://localhost:8085/api/v1/revocations/credentials/did:web:BPNL01-revocation", + "issuer": "did:key:z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce", + "issuanceDate": "2023-11-30T11:29:17Z", + "issued": "2023-11-30T11:29:17Z", + "validFrom": "2023-11-30T11:29:17Z", + "proof": { + "type": "JsonWebSignature2020", + "creator": "did:key:z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce", + "created": "2023-11-30T11:29:17Z", + "verificationMethod": "did:key:z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce#z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce", + "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..Iv6H_e4kfLj9dr0COsB2D_ZPpkMoFj3BVXW2iyKFC3q5QtvPWraWfzEDJ5fxtfd5bARJQIP6YhaXdfSRgJpACQ" + }, + "credentialSubject": { + "id": "did:key:z6MkhGTzcvb8BXh5aeoaFvb3XJ3MBmfLRamdYdXyV1pxJBce", + "type": "StatusList2021Credential", + "statusPurpose": "revocation", + "encodedList": "H4sIAAAAAAAA/+3BMQEAAAjAoEqzfzk/SwjUmQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIDXFiqoX4AAAAIA" + } + } + """; + + VerifiableCredential verifiableCredential = new VerifiableCredential(objectMapper.readValue(vcString, Map.class)); + Mockito.when(revocationClient.getStatusListCredential(Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class), Mockito.any(String.class))).thenReturn(verifiableCredential); + } + + public static String createEncodedList() throws IOException { + BitSet bitSet = new BitSet(16 * 1024 * 8); + + byte[] bitstringBytes = bitSet.toByteArray(); + // Perform GZIP compression + ByteArrayOutputStream gzipOutput = new ByteArrayOutputStream(); + try (GZIPOutputStream gzipStream = new GZIPOutputStream(gzipOutput)) { + gzipStream.write(bitstringBytes); + } + + + // Base64 encode the compressed byte array + byte[] compressedBytes = gzipOutput.toByteArray(); + String encodedList = Base64.getEncoder().encodeToString(compressedBytes); + + + return encodedList; + } } diff --git a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/HoldersCredentialTest.java b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/HoldersCredentialTest.java index fa74e9c0..624eb5d6 100644 --- a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/HoldersCredentialTest.java +++ b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/HoldersCredentialTest.java @@ -23,8 +23,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import com.teketik.test.mockinbean.MockInBean; import lombok.SneakyThrows; import org.eclipse.tractusx.managedidentitywallets.ManagedIdentityWalletsApplication; +import org.eclipse.tractusx.managedidentitywallets.commons.constant.CredentialStatus; import org.eclipse.tractusx.managedidentitywallets.commons.constant.StringPool; import org.eclipse.tractusx.managedidentitywallets.config.MIWSettings; import org.eclipse.tractusx.managedidentitywallets.config.TestContextInitializer; @@ -36,6 +38,8 @@ import org.eclipse.tractusx.managedidentitywallets.dao.repository.WalletRepository; import org.eclipse.tractusx.managedidentitywallets.dto.CreateWalletRequest; import org.eclipse.tractusx.managedidentitywallets.dto.CredentialVerificationRequest; +import org.eclipse.tractusx.managedidentitywallets.revocation.RevocationClient; +import org.eclipse.tractusx.managedidentitywallets.service.revocation.RevocationService; import org.eclipse.tractusx.managedidentitywallets.utils.AuthenticationUtils; import org.eclipse.tractusx.managedidentitywallets.utils.TestUtils; import org.eclipse.tractusx.ssi.lib.did.resolver.DidResolver; @@ -54,7 +58,9 @@ import org.eclipse.tractusx.ssi.lib.proof.LinkedDataProofValidation; import org.eclipse.tractusx.ssi.lib.serialization.SerializeUtil; import org.json.JSONException; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -95,9 +101,24 @@ class HoldersCredentialTest { @Autowired private TestRestTemplate restTemplate; + @MockInBean(RevocationService.class) + private RevocationClient revocationClient; + @Autowired private IssuersCredentialController credentialController; + @SneakyThrows + @BeforeEach + void beforeEach() { + TestUtils.mockGetStatusListEntry(revocationClient); + TestUtils.mockGetStatusListVC(revocationClient, objectMapper, TestUtils.createEncodedList()); + TestUtils.mockRevocationVerification(revocationClient, CredentialStatus.ACTIVE); + } + + @AfterEach + void afterEach() { + Mockito.reset(revocationClient); + } @Test void issueCredentialTestWithInvalidBPNAccess403() throws JsonProcessingException { @@ -122,7 +143,6 @@ void issueCredentialTest200() throws JsonProcessingException { ResponseEntity response = issueVC(bpn, did, type, headers); - Assertions.assertEquals(HttpStatus.CREATED.value(), response.getStatusCode().value()); VerifiableCredential verifiableCredential = new VerifiableCredential(new ObjectMapper().readValue(response.getBody(), Map.class)); Assertions.assertNotNull(verifiableCredential.getProof()); diff --git a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/IssuersCredentialTest.java b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/IssuersCredentialTest.java index 712dcf5c..92fc8b40 100644 --- a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/IssuersCredentialTest.java +++ b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/IssuersCredentialTest.java @@ -24,7 +24,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import com.teketik.test.mockinbean.MockInBean; +import lombok.SneakyThrows; import org.eclipse.tractusx.managedidentitywallets.ManagedIdentityWalletsApplication; +import org.eclipse.tractusx.managedidentitywallets.commons.constant.CredentialStatus; import org.eclipse.tractusx.managedidentitywallets.commons.constant.StringPool; import org.eclipse.tractusx.managedidentitywallets.commons.exception.ForbiddenException; import org.eclipse.tractusx.managedidentitywallets.config.MIWSettings; @@ -37,15 +40,20 @@ import org.eclipse.tractusx.managedidentitywallets.dao.repository.IssuersCredentialRepository; import org.eclipse.tractusx.managedidentitywallets.dao.repository.WalletRepository; import org.eclipse.tractusx.managedidentitywallets.dto.CreateWalletRequest; +import org.eclipse.tractusx.managedidentitywallets.revocation.RevocationClient; +import org.eclipse.tractusx.managedidentitywallets.service.revocation.RevocationService; import org.eclipse.tractusx.managedidentitywallets.utils.AuthenticationUtils; import org.eclipse.tractusx.managedidentitywallets.utils.TestUtils; import org.eclipse.tractusx.ssi.lib.did.web.DidWebFactory; import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredential; import org.eclipse.tractusx.ssi.lib.serialization.SerializeUtil; import org.json.JSONException; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; @@ -82,6 +90,22 @@ class IssuersCredentialTest { private IssuersCredentialRepository issuersCredentialRepository; + @MockInBean(RevocationService.class) + private RevocationClient revocationClient; + + @SneakyThrows + @BeforeEach + void beforeEach() { + TestUtils.mockGetStatusListEntry(revocationClient); + TestUtils.mockGetStatusListVC(revocationClient, objectMapper, TestUtils.createEncodedList()); + TestUtils.mockRevocationVerification(revocationClient, CredentialStatus.ACTIVE); + } + + @AfterEach + void afterEach() { + Mockito.reset(revocationClient); + } + @Test void getCredentials200() throws com.fasterxml.jackson.core.JsonProcessingException, JSONException { String baseBPN = miwSettings.authorityWalletBpn(); diff --git a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationServiceTest.java b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationServiceTest.java index df45f40a..3e92c03d 100644 --- a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationServiceTest.java +++ b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationServiceTest.java @@ -26,8 +26,10 @@ import com.nimbusds.jwt.JWTClaimsSet; import com.nimbusds.jwt.JWTParser; import com.nimbusds.jwt.SignedJWT; +import com.teketik.test.mockinbean.MockInBean; import lombok.SneakyThrows; import org.eclipse.tractusx.managedidentitywallets.ManagedIdentityWalletsApplication; +import org.eclipse.tractusx.managedidentitywallets.commons.constant.CredentialStatus; import org.eclipse.tractusx.managedidentitywallets.commons.constant.StringPool; import org.eclipse.tractusx.managedidentitywallets.commons.exception.BadDataException; import org.eclipse.tractusx.managedidentitywallets.config.MIWSettings; @@ -38,8 +40,10 @@ import org.eclipse.tractusx.managedidentitywallets.dao.repository.WalletRepository; import org.eclipse.tractusx.managedidentitywallets.exception.MissingVcTypesException; import org.eclipse.tractusx.managedidentitywallets.exception.PermissionViolationException; +import org.eclipse.tractusx.managedidentitywallets.revocation.RevocationClient; import org.eclipse.tractusx.managedidentitywallets.service.IssuersCredentialService; import org.eclipse.tractusx.managedidentitywallets.service.PresentationService; +import org.eclipse.tractusx.managedidentitywallets.service.revocation.RevocationService; import org.eclipse.tractusx.managedidentitywallets.utils.AuthenticationUtils; import org.eclipse.tractusx.managedidentitywallets.utils.TestConstants; import org.eclipse.tractusx.managedidentitywallets.utils.TestUtils; @@ -47,8 +51,11 @@ import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredential; import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredentialSubject; import org.eclipse.tractusx.ssi.lib.model.verifiable.presentation.VerifiablePresentation; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; @@ -98,6 +105,23 @@ class PresentationServiceTest { @Autowired private WalletRepository walletRepository; + @MockInBean(RevocationService.class) + private RevocationClient revocationClient; + + @SneakyThrows + @BeforeEach + void beforeEach() { + TestUtils.mockGetStatusListEntry(revocationClient); + TestUtils.mockGetStatusListVC(revocationClient, objectMapper, TestUtils.createEncodedList()); + TestUtils.mockRevocationVerification(revocationClient, CredentialStatus.ACTIVE); + } + + @AfterEach + void afterEach() { + Mockito.reset(revocationClient); + } + + @SneakyThrows @Test void createPresentation200ResponseAsJWT() { diff --git a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationTest.java b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationTest.java index e0b8e2f2..81fe85a5 100644 --- a/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationTest.java +++ b/miw/src/test/java/org/eclipse/tractusx/managedidentitywallets/vp/PresentationTest.java @@ -25,8 +25,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.nimbusds.jwt.JWTClaimsSet; import com.nimbusds.jwt.SignedJWT; +import com.teketik.test.mockinbean.MockInBean; import lombok.SneakyThrows; import org.eclipse.tractusx.managedidentitywallets.ManagedIdentityWalletsApplication; +import org.eclipse.tractusx.managedidentitywallets.commons.constant.CredentialStatus; import org.eclipse.tractusx.managedidentitywallets.commons.constant.StringPool; import org.eclipse.tractusx.managedidentitywallets.config.MIWSettings; import org.eclipse.tractusx.managedidentitywallets.config.TestContextInitializer; @@ -36,7 +38,9 @@ import org.eclipse.tractusx.managedidentitywallets.dao.entity.Wallet; import org.eclipse.tractusx.managedidentitywallets.dao.repository.HoldersCredentialRepository; import org.eclipse.tractusx.managedidentitywallets.dao.repository.WalletRepository; +import org.eclipse.tractusx.managedidentitywallets.revocation.RevocationClient; import org.eclipse.tractusx.managedidentitywallets.service.IssuersCredentialService; +import org.eclipse.tractusx.managedidentitywallets.service.revocation.RevocationService; import org.eclipse.tractusx.managedidentitywallets.utils.AuthenticationUtils; import org.eclipse.tractusx.managedidentitywallets.utils.TestUtils; import org.eclipse.tractusx.ssi.lib.did.resolver.DidResolver; @@ -48,7 +52,9 @@ import org.eclipse.tractusx.ssi.lib.model.verifiable.credential.VerifiableCredentialType; import org.jetbrains.annotations.NotNull; import org.json.JSONException; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.MockedConstruction; import org.mockito.Mockito; @@ -101,6 +107,22 @@ class PresentationTest { @Autowired private WalletRepository walletRepository; + @MockInBean(RevocationService.class) + private RevocationClient revocationClient; + + @SneakyThrows + @BeforeEach + void beforeEach() { + TestUtils.mockGetStatusListEntry(revocationClient); + TestUtils.mockGetStatusListVC(revocationClient, objectMapper, TestUtils.createEncodedList()); + TestUtils.mockRevocationVerification(revocationClient, CredentialStatus.ACTIVE); + } + + @AfterEach + void afterEach() { + Mockito.reset(revocationClient); + } + @Test void validateVPAssJsonLd400() throws JsonProcessingException, JSONException {