Skip to content

Commit

Permalink
Added unit test cases for new classes.
Browse files Browse the repository at this point in the history
Signed-off-by: Mahammed Taheer <[email protected]>
  • Loading branch information
mahammedtaheer committed Oct 30, 2023
1 parent 5cdb93f commit dcf5404
Show file tree
Hide file tree
Showing 3 changed files with 347 additions and 124 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package io.mosip.authentication.service.kyc.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.io.File;
import java.io.IOException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -19,6 +21,7 @@
import java.util.Set;
import java.util.stream.Collectors;

import org.apache.commons.codec.DecoderException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -41,19 +44,23 @@
import com.fasterxml.jackson.databind.ObjectMapper;

import io.mosip.authentication.common.service.config.IDAMappingConfig;
import io.mosip.authentication.common.service.entity.KycTokenData;
import io.mosip.authentication.common.service.factory.IDAMappingFactory;
import io.mosip.authentication.common.service.helper.IdInfoHelper;
import io.mosip.authentication.common.service.impl.IdInfoFetcherImpl;
import io.mosip.authentication.common.service.impl.match.BioMatchType;
import io.mosip.authentication.common.service.repository.KycTokenDataRepository;
import io.mosip.authentication.common.service.transaction.manager.IdAuthSecurityManager;
import io.mosip.authentication.common.service.util.EnvUtil;
import io.mosip.authentication.core.constant.IdAuthCommonConstants;
import io.mosip.authentication.core.constant.IdAuthenticationErrorConstants;
import io.mosip.authentication.core.exception.IdAuthenticationBusinessException;
import io.mosip.authentication.core.exception.IdAuthenticationDaoException;
import io.mosip.authentication.core.indauth.dto.IdentityInfoDTO;
import io.mosip.authentication.core.indauth.dto.EKycResponseDTO;
import io.mosip.authentication.core.spi.bioauth.CbeffDocType;
import io.mosip.authentication.core.indauth.dto.IdentityInfoDTO;
import io.mosip.authentication.core.indauth.dto.KycExchangeRequestDTO;
import io.mosip.authentication.core.spi.indauth.match.MappingConfig;
import io.mosip.authentication.core.util.CryptoUtil;
import io.mosip.kernel.cbeffutil.impl.CbeffImpl;

/**
Expand Down Expand Up @@ -102,6 +109,12 @@ public class KycServiceImplTest {
@Autowired
private ObjectMapper mapper;

@Mock
private KycTokenDataRepository kycTokenDataRepo;

@Mock
private IdAuthSecurityManager securityManager;

@Value("${sample.demo.entity}")
String value;

Expand Down Expand Up @@ -692,4 +705,76 @@ public void testGetKycInfo_photo_withPhotoNotInAllowedKycAttrib() throws IdAuthe
Map<String, String> expected = Map.of();
assertTrue(kycInfo.entrySet().containsAll(expected.entrySet()));
}

@Test
public void generateAndSaveKycTokenTest() throws DecoderException {
String idHash = "73616d706c65496448617368";
String authToken = "testAuthToken";
String oidcClientId = "sampleOidcClientId";
String requestTime = "2023-10-19T12:35:57.835Z";
String tokenGenerationTime = "2023-10-19T12:35:57.835Z";
String reqTransactionId = "abc1234";
String resKycToken = "sampleKycToken";
KycTokenData kycTokenData = new KycTokenData();

Mockito.when(securityManager.generateKeyedHash(Mockito.any())).thenReturn(resKycToken);
Mockito.when(kycTokenDataRepo.saveAndFlush(kycTokenData)).thenReturn(null);

String kycToken = ReflectionTestUtils.invokeMethod(kycServiceImpl2, "generateAndSaveKycToken", idHash, authToken, oidcClientId, requestTime,
tokenGenerationTime, reqTransactionId);
assertEquals(kycToken, resKycToken);
}

@Test
public void isKycTokenExpireTest() {
LocalDateTime currentTime = LocalDateTime.now();
LocalDateTime tokenIssuedTime = currentTime.minusSeconds(20);
String dummyToken = "dummyToken";
boolean valid = ReflectionTestUtils.invokeMethod(kycServiceImpl2, "isKycTokenExpire", tokenIssuedTime, dummyToken);
assertFalse(valid);
}

@Test
public void isKycTokenExpireTokenExpiredTest() {
LocalDateTime currentTime = LocalDateTime.now();
LocalDateTime tokenIssuedTime = currentTime.plusSeconds(310);
String dummyToken = "dummyToken";
boolean valid = ReflectionTestUtils.invokeMethod(kycServiceImpl2, "isKycTokenExpire", tokenIssuedTime, dummyToken);
assertTrue(valid);
}

@Test
public void buildKycExchangeResponseTest() throws IdAuthenticationBusinessException {

String dummySubject = "dummyPSUToken";
List<String> consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "individual_id", "picture");
List<String> consentedLocales = Arrays.asList("ara");
String idVid = "12232323121";
KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO();
ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id");
ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address");
ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[]{});
ReflectionTestUtils.setField(kycServiceImpl2, "consentedFaceAttributeName", "picture");
ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper);

String resKycToken = "responseJWTToken";
Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken);
Map<String, String> faceMap = prepareFaceData(idInfo);
Mockito.when(idInfoHelper.getIdEntityInfoMap(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(faceMap);

String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO);
assertEquals(response, resKycToken);
}

private Map<String, String> prepareFaceData(Map<String, List<IdentityInfoDTO>> idInfo) {
String faceData = "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI_Pgo8QklSIHhtbG5zPSJodHRwOi8vZG9jcy5vYXNpcy1vcGVuLm9yZy9iaWFzL25zL2JpYXNwYXRyb25mb3JtYXQtMS4wLyI-CiAgICA8VmVyc2lvbj4KICAgICAgICA8TWFqb3I-MTwvTWFqb3I-CiAgICAgICAgPE1pbm9yPjE8L01pbm9yPgogICAgPC9WZXJzaW9uPgogICAgPENCRUZGVmVyc2lvbj4KICAgICAgICA8TWFqb3I-MT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zbk9hMXZpU2tjQXRxcy93Q2p2aE54a2JWUGFRMW9QVmgyNUorOTRLT2VVeG02bGhqY3JwZDZqQW5zQU1SSjBHWnZPOXR3b3JqSzMzbU9IYjdKL1JaNUxTMkYxNnB6eVdEcWJ1bGdJYzgrN0c0OXZzdTIvb3BNV0UxTW0wYmdQeldBK2EyQTFmVnpxZDZHSFV2Q1R0NUhnZHpkVDZxNlFZYXlQM1dqeDNQcXJ4SVZEa1RxdE9tUkJxR3JHT0s0YzFOS1B5aytpeXVaaTF0eHJ4SGN1cG9lVjJ5dityVy9xcmVPVzNzcjVMSk83QXd2WUNxdGpYcHpWdFlsRUVnZ2drRUVFRWFFRWJGZEFkRUhTUjlxQW9hdHdFND08L0JEQj4KICAgIDwvQklSPgo8L0JJUj4K";
List<IdentityInfoDTO> identityList = new ArrayList<>();
IdentityInfoDTO identityInfoDTO = new IdentityInfoDTO();
identityInfoDTO.setLanguage(null);
identityInfoDTO.setValue(new String(CryptoUtil.decodeBase64Url(faceData)));
identityList.add(identityInfoDTO);
idInfo.put("Face", identityList);
return Map.of("Face", new String(CryptoUtil.decodeBase64Url(faceData)));
}

}
Loading

0 comments on commit dcf5404

Please sign in to comment.