diff --git a/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/CredentialTest.java b/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/CredentialTest.java index 4302876a7..b8dcce5e5 100644 --- a/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/CredentialTest.java +++ b/src/test/java/org/eclipse/tractusx/managedidentitywallets/vc/CredentialTest.java @@ -130,6 +130,23 @@ void getCredentials200() throws com.fasterxml.jackson.core.JsonProcessingExcepti Assertions.assertEquals(1, Objects.requireNonNull(credentialList).size()); } + @Test + void validateCredentials200() throws com.fasterxml.jackson.core.JsonProcessingException { + String bpn = UUID.randomUUID().toString(); + + HttpHeaders headers = AuthenticationUtils.getValidUserHttpHeaders(bpn); + TestUtils.createWallet(bpn, "Test", restTemplate); + ResponseEntity vc = TestUtils.issueMembershipVC(restTemplate, bpn, miwSettings.authorityWalletBpn()); + VerifiableCredential verifiableCredential = new VerifiableCredential(new ObjectMapper().readValue(vc.getBody(), Map.class)); + Map map = objectMapper.readValue(verifiableCredential.toJson(), Map.class); + HttpEntity entity = new HttpEntity<>(map, headers); +// ResponseEntity response = restTemplate.exchange(RestURI.CREDENTIALS_VALIDATION, HttpMethod.POST, entity, Map.class); +// Boolean valid = proofValidation.checkProof(verifiableCredential); +// Assertions.assertEquals(HttpStatus.OK.value(), response.getStatusCode().value());// TODO did will resolved +// Assertions.assertTrue((Boolean) response.getBody().get("valid")); //TODO getting false from lib + + } + private List getCredentialsFromString(String body) throws com.fasterxml.jackson.core.JsonProcessingException { List credentialList = new ArrayList<>();