Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
Signed-off-by: Loganathan Sekar <[email protected]>
  • Loading branch information
Loganathan Sekar authored and Loganathan Sekar committed Feb 22, 2024
1 parent 5bb7834 commit f60081c
Showing 1 changed file with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@

import java.io.IOException;
import java.lang.reflect.Field;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import io.mosip.kernel.core.exception.ExceptionUtils;
import io.mosip.registration.processor.opencrvs.stage.OpencrvsStage;
import org.json.simple.JSONObject;
import org.junit.Before;
import org.junit.Test;
Expand All @@ -31,8 +33,10 @@
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import io.mosip.kernel.core.exception.ExceptionUtils;
import io.mosip.kernel.core.exception.ServiceError;
import io.mosip.registration.processor.core.abstractverticle.EventDTO;
import io.mosip.registration.processor.core.abstractverticle.HealthCheckDTO;
import io.mosip.registration.processor.core.abstractverticle.MessageBusAddress;
import io.mosip.registration.processor.core.abstractverticle.MessageDTO;
import io.mosip.registration.processor.core.abstractverticle.MosipEventBus;
Expand All @@ -53,6 +57,7 @@
import io.mosip.registration.processor.core.spi.eventbus.EventHandler;
import io.mosip.registration.processor.core.spi.restclient.RegistrationProcessorRestClientService;
import io.mosip.registration.processor.core.util.PropertiesUtil;
import io.mosip.registration.processor.opencrvs.stage.OpencrvsStage;
import io.mosip.registration.processor.packet.storage.utils.Utilities;
import io.mosip.registration.processor.rest.client.audit.builder.AuditLogRequestBuilder;
import io.mosip.registration.processor.rest.client.audit.dto.AuditResponseDto;
Expand Down Expand Up @@ -134,6 +139,18 @@ public void consumeAndSend(MessageBusAddress fromAddress, MessageBusAddress toAd
public void send(MessageBusAddress toAddress, MessageDTO message) {

}

@Override
public void consumerHealthCheck(Handler<HealthCheckDTO> eventHandler, String address) {
// TODO Auto-generated method stub

}

@Override
public void senderHealthCheck(Handler<HealthCheckDTO> eventHandler, String address) {
// TODO Auto-generated method stub

}
};
}

Expand Down Expand Up @@ -216,7 +233,7 @@ public void setup() throws Exception {
Map<String, String> map1 = new HashMap<>();
map1.put("UIN", "4238135072");
JSONObject jsonObject = new JSONObject(map1);
Mockito.when(utitilites.retrieveUIN(any())).thenReturn(jsonObject);
Mockito.when(utitilites.retrieveIdrepoJson(any())).thenReturn(jsonObject);



Expand Down Expand Up @@ -352,7 +369,7 @@ public void testUINNotavailable()
Map<String, String> map1 = new HashMap<>();

JSONObject jsonObject = new JSONObject(map1);
Mockito.when(utitilites.retrieveUIN(any())).thenReturn(jsonObject);
Mockito.when(utitilites.retrieveIdrepoJson(any())).thenReturn(jsonObject);
MessageDTO result = stage.process(dto);

assertFalse(result.getIsValid());
Expand Down

0 comments on commit f60081c

Please sign in to comment.