Skip to content

Commit 5c63314

Browse files
[MOSIP-43903] - Increased Junit code coverage for Registration Processor (develop branch) (#2249)
* [MOSIP-43903] - Increased Junit code coverage for Registration Processor (develop branch) Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * added coverage for BioDedupeProcessor Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * added coverage for notificationServiceImpl Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * added more coverage Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * added ManualAdjudicationServiceImpl coverage Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * Refactor name Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * [MOSIP-43903] - camelcase name corrected Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * [MOSIP-43903] - Refactor test method based on code rabbit review Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * [MOSIP-43903] - Refactor test method based on code rabbit review Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * [MOSIP-43903] - Refactor test method based on code rabbit review Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * [MOSIP-43903] - Refactor test method review changes Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * [MOSIP-43903] - reviewed unit test changes Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> * [MOSIP-43903] : Test cases changed according to the comments Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com> --------- Signed-off-by: Nidhi0201 <nidhi.k@cyberpwn.com> Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com> Co-authored-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
1 parent 11a656b commit 5c63314

8 files changed

Lines changed: 1132 additions & 1 deletion

File tree

registration-processor/core-processor/registration-processor-bio-dedupe-stage/src/test/java/io/mosip/registration/processor/biodedupe/stage/BioDedupeProcessorTest.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import io.mosip.registration.processor.biodedupe.stage.exception.CbeffNotFoundException;
2020
import io.mosip.registration.processor.core.code.*;
2121
import io.mosip.registration.processor.core.constant.ProviderStageName;
22+
import io.mosip.registration.processor.core.constant.RegistrationType;
2223
import io.mosip.registration.processor.core.exception.*;
2324
import io.mosip.registration.processor.core.packet.dto.abis.ProcessedMatchedResult;
2425
import io.mosip.registration.processor.packet.storage.utils.PriorityBasedPacketManagerService;
@@ -947,4 +948,32 @@ public void testProcess_ThrowsBiometricClassificationException() throws PacketMa
947948
assertEquals(MessageBusAddress.VERIFICATION_BUS_IN, result.getMessageBusAddress());
948949
}
949950

951+
@Test
952+
public void testProcessWhenExceptionOccursShouldSetValidStatusFalseAndInternalErrorTrue() {
953+
954+
MessageDTO messageDTO = new MessageDTO();
955+
messageDTO.setRid("10031100110005020190313110030");
956+
when(abisHandlerUtil.getPacketStatus(any()))
957+
.thenThrow(new RuntimeException("test exception"));
958+
MessageDTO result = bioDedupeProcessor.process(messageDTO, stageName);
959+
960+
assertFalse(result.getIsValid());
961+
assertTrue(result.getInternalError());
962+
}
963+
964+
@Test
965+
public void testNewPacketPreAbisIdentificationWhenInfantDedupeDisabledSuccessStatus() throws ApisResourceAccessException, PacketManagerException, IOException, JsonProcessingException {
966+
967+
ReflectionTestUtils.setField(bioDedupeProcessor, "infantDedupe", "N");
968+
MessageDTO messageDTO = new MessageDTO();
969+
messageDTO.setReg_type(RegistrationType.NEW.name());
970+
Mockito.when(bioDedupeService.getFileByRegId(anyString(),anyString())).thenReturn(null);
971+
Mockito.when(utility.getApplicantAge(any(),any(),any())).thenReturn(3);
972+
MessageDTO messageDto = bioDedupeProcessor.process(messageDTO, stageName);
973+
assertTrue(messageDto.getIsValid());
974+
assertEquals(MessageBusAddress.BIO_DEDUPE_BUS_IN, messageDTO.getMessageBusAddress());
975+
assertEquals(RegistrationStatusCode.PROCESSING.name(), registrationStatusDto.getStatusCode());
976+
assertEquals(RegistrationTransactionStatusCode.SUCCESS.name(), registrationStatusDto.getLatestTransactionStatusCode());
977+
}
978+
950979
}

registration-processor/core-processor/registration-processor-manual-adjudication-stage/src/test/java/io/mosip/registration/processor/verification/service/ManualAdjudicationServiceTest.java

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import static org.assertj.core.api.Assertions.assertThat;
44
import static org.junit.Assert.assertFalse;
55
import static org.junit.Assert.assertTrue;
6+
import static org.junit.Assert.assertEquals;
7+
import static org.junit.Assert.assertNotNull;
68
import static org.mockito.ArgumentMatchers.*;
79

810
import java.io.File;
@@ -22,6 +24,7 @@
2224
import io.mosip.registration.processor.adjudication.request.dto.Filter;
2325
import io.mosip.registration.processor.adjudication.request.dto.ShareableAttributes;
2426
import io.mosip.registration.processor.adjudication.request.dto.Source;
27+
import io.mosip.registration.processor.core.code.RegistrationExceptionTypeCode;
2528
import io.mosip.registration.processor.core.exception.PacketManagerNonRecoverableException;
2629
import org.apache.commons.io.IOUtils;
2730
import org.assertj.core.groups.Tuple;
@@ -31,6 +34,7 @@
3134
import org.junit.Ignore;
3235
import org.junit.Test;
3336
import org.junit.runner.RunWith;
37+
import org.mockito.ArgumentCaptor;
3438
import org.mockito.InjectMocks;
3539
import org.mockito.Mock;
3640
import org.mockito.Mockito;
@@ -812,4 +816,93 @@ public void PacketManagerNonRecoverableExceptionTest() throws Exception {
812816
assertFalse(messageDTO.getIsValid());
813817
assertTrue(messageDTO.getInternalError());
814818
}
819+
820+
@Test
821+
public void testProcessShouldInvalidateMessageWhenDataShareUrlPresent() throws Exception {
822+
823+
ShareableAttributes shareableAttributes1 = new ShareableAttributes();
824+
shareableAttributes1.setAttributeName("biometrics");
825+
shareableAttributes1.setEncrypted(true);
826+
827+
List<Source> sourceList = new ArrayList<>();
828+
Source source1 = new Source();
829+
source1.setAttribute("biometrics");
830+
List<Filter> filterlist = new ArrayList<>();
831+
Filter filter11 = new Filter();
832+
filter11.setLanguage("lang");
833+
filter11.setType("type");
834+
filterlist.add(filter11);
835+
source1.setFilter(filterlist);
836+
sourceList.add(source1);
837+
838+
shareableAttributes1.setSource(sourceList);
839+
shareableAttributes1.setFormat("");
840+
shareableAttributes1.setGroup("");
841+
842+
MessageDTO object = new MessageDTO();
843+
object.setReg_type("NEW");
844+
object.setRid("92379526572940");
845+
object.setIteration(1);
846+
object.setWorkflowInstanceId("26fa3eff-f3b9-48f7-b365-d7f7c2e56e00");
847+
setDataShareDetails();
848+
849+
Map<String, String> identity = new HashMap<String, String>();
850+
identity.put("fullName", "Satish");
851+
Mockito.when(packetManagerService.getFields(anyString(), any(), anyString(), any())).thenReturn(identity);
852+
Mockito.when(mapper.writeValueAsString(any())).thenReturn("");
853+
Mockito.when(mapper.readValue(anyString(),any(Class.class))).thenReturn(shareableAttributes1).thenReturn(shareableAttributes1).thenReturn(shareableAttributes1);
854+
855+
MessageDTO messageDTO = manualAdjudicationService.process(object,queue);
856+
857+
assertFalse(messageDTO.getIsValid());
858+
assertFalse(messageDTO.getInternalError());
859+
}
860+
861+
@Test
862+
public void updatePacketStatusSuccessFlowWhenStatusRejected() {
863+
864+
ManualAdjudicationResponseDTO adjudicationResponseDTO = new ManualAdjudicationResponseDTO();
865+
adjudicationResponseDTO.setReturnValue(4);
866+
adjudicationResponseDTO.setResponsetime(DateUtils.getCurrentDateTimeString());
867+
adjudicationResponseDTO.setId("mosip.manual.adjudication.adjudicate");
868+
adjudicationResponseDTO.setRequestId("4d4f27d3-ec73-41c4-a384-bf87fce4969e");
869+
CandidateList candidateList = new CandidateList();
870+
candidateList.setCount(0);
871+
adjudicationResponseDTO.setCandidateList(candidateList);
872+
873+
Mockito.when(basePacketRepository.getAllAssignedRecord(anyString(), anyString())).thenReturn(entities);
874+
Mockito.when(registrationStatusService.getRegistrationStatus(any(), any(), any(), any())).thenReturn(registrationStatusDto);
875+
Mockito.when(basePacketRepository.getAssignedApplicantDetails(anyString(), anyString())).thenReturn(null);
876+
Mockito.when(basePacketRepository.update(any(ManualVerificationEntity.class))).thenReturn(manualVerificationEntity);
877+
Mockito.when(basePacketRepository.getRegistrationIdbyRequestId(anyString())).thenReturn(Lists.newArrayList(manualVerificationEntity));
878+
879+
manualVerificationDTO.setStatusCode(ManualVerificationStatus.REJECTED.name());
880+
881+
ArgumentCaptor<MessageDTO> messageCaptor = ArgumentCaptor.forClass(MessageDTO.class);
882+
883+
Mockito.doNothing().when(manualAdjudicationStage).sendMessage(messageCaptor.capture());
884+
boolean result = manualAdjudicationService.updatePacketStatus(adjudicationResponseDTO, stageName, queue);
885+
assertTrue(result);
886+
MessageDTO capturedMessage = messageCaptor.getValue();
887+
assertNotNull(capturedMessage);
888+
assertEquals(Boolean.FALSE, capturedMessage.getInternalError());
889+
assertEquals(Boolean.FALSE, capturedMessage.getIsValid());
890+
}
891+
892+
@Test
893+
public void testProcessShouldHandleInvalidRidException() {
894+
895+
MessageDTO object = new MessageDTO();
896+
object.setRid("");
897+
object.setReg_type("NEW");
898+
object.setIteration(1);
899+
object.setWorkflowInstanceId("wf-123");
900+
901+
Mockito.when(registrationExceptionMapperUtil.getStatusCode(RegistrationExceptionTypeCode.MANUAL_VERIFICATION_FAILED))
902+
.thenReturn("FAILED_CODE");
903+
904+
MessageDTO response = manualAdjudicationService.process(object, queue);
905+
assertTrue(response.getInternalError());
906+
assertFalse(response.getIsValid());
907+
}
815908
}

registration-processor/core-processor/registration-processor-uin-generator-stage/src/test/java/io/mosip/registration/processor/stages/uigenerator/UinGeneratorStageTest.java

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ public Integer getPort() {
242242

243243
/** The Constant CONFIG_SERVER_URL. */
244244
private static final String CONFIG_SERVER_URL = "url";
245+
private static final String IDREPO_STATUS = "DRAFTED";
245246

246247
private String identityMappingjsonString;
247248

@@ -2775,4 +2776,206 @@ public void testProcess_WithLostPacket_ShouldReturnNull() throws Exception {
27752776
assertNull(demographicIdentity.get("packetCreatedOn"));
27762777
}
27772778

2779+
@Test
2780+
public void testProcessUinGenerationReprocessShouldSetReprocessStatus() throws IOException, PacketManagerException, ApisResourceAccessException, JsonProcessingException,
2781+
IdrepoDraftReprocessableException, IdrepoDraftException {
2782+
List<ErrorDTO> errors = new ArrayList<>();
2783+
ErrorDTO errorDTO = new ErrorDTO();
2784+
errorDTO.setErrorCode("IDR-IDC-004");
2785+
errorDTO.setMessage("Unknown error occurred");
2786+
errors.add(errorDTO);
2787+
2788+
MessageDTO messageDTO = new MessageDTO();
2789+
messageDTO.setRid("10031100110005020190313110030");
2790+
messageDTO.setReg_type(RegistrationType.NEW.name());
2791+
IdResponseDTO idResponseDTO = new IdResponseDTO();
2792+
idResponseDTO.setErrors(errors);
2793+
2794+
when(utilities.getRegistrationProcessorMappingJson(MappingJsonConstants.IDENTITY)).thenReturn(identityObj);
2795+
when(utilities.getRegistrationProcessorMappingJson(MappingJsonConstants.DOCUMENT)).thenReturn(documentObj);
2796+
Mockito.when(registrationStatusMapperUtil
2797+
.getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_REPROCESS)).thenReturn(RegistrationTransactionStatusCode.REPROCESS.toString());
2798+
2799+
when(packetManagerService.getFields(any(), any(), any(), any())).thenReturn(new HashMap<>());
2800+
when(packetManagerService.getFieldByMappingJsonKey(anyString(), anyString(), any(), any())).thenReturn("0.1");
2801+
2802+
when(idrepoDraftService.idrepoUpdateDraft(anyString(), any(), any())).thenReturn(idResponseDTO);
2803+
2804+
MessageDTO result = uinGeneratorStage.process(messageDTO);
2805+
assertTrue(result.getInternalError());
2806+
assertTrue(result.getIsValid());
2807+
}
2808+
2809+
@Test
2810+
public void testProcessUinGenerationFailedShouldSetFailedStatus() throws IOException, PacketManagerException, ApisResourceAccessException, JsonProcessingException,
2811+
IdrepoDraftReprocessableException, IdrepoDraftException {
2812+
2813+
List<ErrorDTO> errors = new ArrayList<>();
2814+
ErrorDTO errorDTO = new ErrorDTO();
2815+
errorDTO.setErrorCode("IDR-IDC-005");
2816+
errors.add(errorDTO);
2817+
2818+
MessageDTO messageDTO = new MessageDTO();
2819+
messageDTO.setRid("10031100110005020190313110030");
2820+
messageDTO.setReg_type(RegistrationType.NEW.name());
2821+
IdResponseDTO idResponseDTO = new IdResponseDTO();
2822+
idResponseDTO.setErrors(errors);
2823+
2824+
when(utilities.getRegistrationProcessorMappingJson(MappingJsonConstants.IDENTITY)).thenReturn(identityObj);
2825+
when(utilities.getRegistrationProcessorMappingJson(MappingJsonConstants.DOCUMENT)).thenReturn(documentObj);
2826+
Mockito.when(registrationStatusMapperUtil
2827+
.getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_FAILED)).thenReturn(RegistrationTransactionStatusCode.FAILED.toString());
2828+
2829+
when(packetManagerService.getFields(any(), any(), any(), any())).thenReturn(new HashMap<>());
2830+
when(packetManagerService.getFieldByMappingJsonKey(anyString(), anyString(), any(), any())).thenReturn("0.1");
2831+
2832+
when(idrepoDraftService.idrepoUpdateDraft(anyString(), any(), any())).thenReturn(idResponseDTO);
2833+
2834+
MessageDTO result = uinGeneratorStage.process(messageDTO);
2835+
assertTrue(result.getInternalError());
2836+
assertFalse(result.getIsValid());
2837+
}
2838+
2839+
@Test
2840+
public void testLostAndUpdateUinWhenIdRepoDraftReturnsNullShouldSetValidStatusFalse() throws Exception {
2841+
Map<String, String> fieldMap = new HashMap<>();
2842+
fieldMap.put("UIN", "123456");
2843+
fieldMap.put("name", "mono");
2844+
fieldMap.put("email", "mono@mono.com");
2845+
2846+
List<String> defaultFields = new ArrayList<>();
2847+
defaultFields.add("name");
2848+
defaultFields.add("dob");
2849+
defaultFields.add("gender");
2850+
defaultFields.add("UIN");
2851+
when(idRepoService.getUinByRid(anyString(), anyString())).thenReturn("9403107397");
2852+
2853+
when(utility.getUIn(any(),any(),any(ProviderStageName.class))).thenReturn("123456");
2854+
when(packetManagerService.getFieldByMappingJsonKey(anyString(),anyString(),any(),any())).thenReturn("0.1");
2855+
when(packetManagerService.getFields(anyString(),anyList(),anyString(),any())).thenReturn(fieldMap);
2856+
when(idSchemaUtil.getDefaultFields(anyDouble())).thenReturn(defaultFields);
2857+
2858+
when(idSchemaUtil.getDefaultFields(anyDouble())).thenReturn(defaultFields);
2859+
MessageDTO messageDTO = new MessageDTO();
2860+
messageDTO.setRid("27847657360002520181210094052");
2861+
messageDTO.setReg_type(RegistrationType.LOST.name());
2862+
String str = "{\"id\":\"mosip.id.read\",\"version\":\"1.0\",\"responsetime\":\"2019-04-05\",\"metadata\":null,\"response\":{\"uin\":\"2812936908\"},\"errors\":[{\"errorCode\":null,\"errorMessage\":null}]}";
2863+
String response = "{\"timestamp\":1553771083721,\"status\":404,\"errors\":[{\"errorCode\":\"KER-UIG-004\",\"errorMessage\":\"Given UIN is not in ISSUED status\"}]}";
2864+
2865+
when(utilities.getRegistrationProcessorMappingJson(MappingJsonConstants.IDENTITY)).thenReturn(identityObj);
2866+
when(registrationProcessorRestClientService.putApi(any(), any(), any(), any(), any(), any(), any()))
2867+
.thenReturn(response);
2868+
2869+
when(packetManagerService.getField(any(), any(), any(),any())).thenReturn("989879234");
2870+
2871+
when(packetManagerService.getFieldByMappingJsonKey(any(), any(), any(), any())).thenReturn("1.0");
2872+
when(regLostUinDetEntity.getLostUinMatchedRegIdByWorkflowId(any())).thenReturn("27847657360002520181210094052");
2873+
MessageDTO result = uinGeneratorStage.process(messageDTO);
2874+
assertFalse(result.getInternalError());
2875+
assertFalse(result.getIsValid());
2876+
}
2877+
2878+
@Test
2879+
public void testReactivateUinWhenStatusActivated() throws Exception {
2880+
2881+
Map<String, String> fieldMap = new HashMap<>();
2882+
fieldMap.put("UIN", "123456");
2883+
fieldMap.put("name", "mono");
2884+
fieldMap.put("email", "mono@mono.com");
2885+
2886+
List<String> defaultFields = new ArrayList<>();
2887+
defaultFields.add("name");
2888+
defaultFields.add("dob");
2889+
defaultFields.add("gender");
2890+
defaultFields.add("UIN");
2891+
2892+
when(utility.getUIn(any(),any(),any(ProviderStageName.class))).thenReturn("123456");
2893+
when(packetManagerService.getFieldByMappingJsonKey(anyString(),anyString(),any(),any())).thenReturn("0.1");
2894+
when(packetManagerService.getFields(any(), any(), any(), any())).thenReturn(fieldMap);
2895+
when(idSchemaUtil.getDefaultFields(anyDouble())).thenReturn(defaultFields);
2896+
2897+
when(idSchemaUtil.getDefaultFields(anyDouble())).thenReturn(defaultFields);
2898+
2899+
MessageDTO messageDTO = new MessageDTO();
2900+
messageDTO.setRid("27847657360002520181210094052");
2901+
messageDTO.setReg_type(RegistrationType.valueOf("ACTIVATED").name());
2902+
2903+
IdResponseDTO idResponseDTO = new IdResponseDTO();
2904+
ResponseDTO responseDTO = new ResponseDTO();
2905+
idResponseDTO.setErrors(null);
2906+
idResponseDTO.setId("mosip.id.update");
2907+
responseDTO.setStatus(io.mosip.registration.processor.status.code.RegistrationType.ACTIVATED.toString());
2908+
idResponseDTO.setResponse(responseDTO);
2909+
idResponseDTO.setResponsetime("2019-01-17T06:29:01.940Z");
2910+
idResponseDTO.setVersion("1.0");
2911+
2912+
IdResponseDTO idResponseDTO1 = new IdResponseDTO();
2913+
ResponseDTO responseDTO1 = new ResponseDTO();
2914+
idResponseDTO1.setErrors(null);
2915+
idResponseDTO1.setId("mosip.id.update");
2916+
responseDTO1.setStatus("DEACTIVATED");
2917+
idResponseDTO1.setResponse(responseDTO1);
2918+
idResponseDTO1.setResponsetime("2019-01-17T06:29:01.940Z");
2919+
idResponseDTO1.setVersion("1.0");
2920+
2921+
when(registrationProcessorRestClientService.getApi(any(), any(), anyString(), any(), any()))
2922+
.thenReturn(idResponseDTO1);
2923+
2924+
when(idrepoDraftService.idrepoUpdateDraft(anyString(), any(), any())).thenReturn(idResponseDTO);
2925+
when(registrationProcessorRestClientService.patchApi(any(), any(), any(), any(), any(), any()))
2926+
.thenReturn(idResponseDTO1);
2927+
MessageDTO result = uinGeneratorStage.process(messageDTO);
2928+
assertTrue(result.getIsValid());
2929+
assertFalse(result.getInternalError());
2930+
}
2931+
2932+
@Test
2933+
public void testUinUpdateWhenIdRepoStatusDraftedShouldReturnTrue() throws ApisResourceAccessException, IOException, JsonProcessingException,
2934+
PacketManagerException, JSONException, IdrepoDraftException, IdrepoDraftReprocessableException {
2935+
Map<String, String> fieldMap = new HashMap<>();
2936+
fieldMap.put("UIN", "123456");
2937+
fieldMap.put("name", "mono");
2938+
fieldMap.put("email", "mono@mono.com");
2939+
2940+
List<String> defaultFields = new ArrayList<>();
2941+
defaultFields.add("name");
2942+
defaultFields.add("dob");
2943+
defaultFields.add("gender");
2944+
defaultFields.add("UIN");
2945+
2946+
when(utility.getUIn(any(),any(),any(ProviderStageName.class))).thenReturn("123456");
2947+
when(packetManagerService.getFields(any(), any(), any(), any())).thenReturn(fieldMap);
2948+
2949+
when(packetManagerService.getFieldByMappingJsonKey(anyString(),anyString(),any(),any())).thenReturn("0.1");
2950+
when(packetManagerService.getFields(anyString(),anyList(),anyString(),any())).thenReturn(fieldMap);
2951+
when(idSchemaUtil.getDefaultFields(anyDouble())).thenReturn(defaultFields);
2952+
2953+
when(idSchemaUtil.getDefaultFields(anyDouble())).thenReturn(defaultFields);
2954+
MessageDTO messageDTO = new MessageDTO();
2955+
messageDTO.setRid("10031100110005020190313110030");
2956+
messageDTO.setReg_type(RegistrationType.valueOf("UPDATE").name());
2957+
IdResponseDTO responsedto = new IdResponseDTO();
2958+
2959+
IdResponseDTO idResponseDTO = new IdResponseDTO();
2960+
ResponseDTO responseDTO = new ResponseDTO();
2961+
idResponseDTO.setErrors(null);
2962+
idResponseDTO.setId("mosip.id.update");
2963+
responseDTO.setStatus(IDREPO_STATUS);
2964+
idResponseDTO.setResponse(responseDTO);
2965+
idResponseDTO.setResponsetime("2019-03-12T06:49:30.779Z");
2966+
idResponseDTO.setVersion("1.0");
2967+
2968+
when(idrepoDraftService.idrepoUpdateDraft(anyString(), any(), any())).thenReturn(idResponseDTO);
2969+
when(registrationProcessorRestClientService.getApi(any(), any(), anyString(), any(), any()))
2970+
.thenReturn(responsedto);
2971+
when(registrationProcessorRestClientService.patchApi(any(), any(), any(), any(), any(), any()))
2972+
.thenReturn(idResponseDTO);
2973+
when(utilities.getRegistrationProcessorMappingJson(MappingJsonConstants.IDENTITY)).thenReturn(identityObj);
2974+
when(utilities.getRegistrationProcessorMappingJson(MappingJsonConstants.DOCUMENT)).thenReturn(documentObj);
2975+
2976+
MessageDTO result = uinGeneratorStage.process(messageDTO);
2977+
assertTrue(result.getIsValid());
2978+
assertFalse(result.getInternalError());
2979+
}
2980+
27782981
}

0 commit comments

Comments
 (0)