@Test public void test_should_enrich_seva_request_with_escalation_date() { HashMap<String, Object> sevaRequestMap = getSevaRequestMap(); final SevaRequest sevaRequest = new SevaRequest(new HashMap<>()); when(workflowService.enrichWorkflow(any(SevaRequest.class))).thenReturn(sevaRequest); complaintAssignmentListener.process(sevaRequestMap); verify(escalationDateService).enrichRequestWithEscalationDate(sevaRequest); }
@KafkaListener(topics = "${kafka.topics.pgr.locationpopulated.name}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); SevaRequest enrichedSevaRequest = null; if (sevaRequest.getKeyword() != null && sevaRequest.getKeyword().equalsIgnoreCase(DELIVERABLE_SERVICE) && !sevaRequest.getKeyword().equalsIgnoreCase(COMPLAINT)) enrichedSevaRequest = commonworkflowService.enrichWorkflow(sevaRequest); else enrichedSevaRequest = workflowService.enrichWorkflow(sevaRequest); positionService.enrichRequestWithPosition(enrichedSevaRequest); escalationDateService.enrichRequestWithEscalationDate(enrichedSevaRequest); complaintMessageQueueRepository.save(enrichedSevaRequest); }
ComplaintAssignmentListener { @KafkaListener(topics = "${kafka.topics.pgr.locationpopulated.name}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); SevaRequest enrichedSevaRequest = null; if (sevaRequest.getKeyword() != null && sevaRequest.getKeyword().equalsIgnoreCase(DELIVERABLE_SERVICE) && !sevaRequest.getKeyword().equalsIgnoreCase(COMPLAINT)) enrichedSevaRequest = commonworkflowService.enrichWorkflow(sevaRequest); else enrichedSevaRequest = workflowService.enrichWorkflow(sevaRequest); positionService.enrichRequestWithPosition(enrichedSevaRequest); escalationDateService.enrichRequestWithEscalationDate(enrichedSevaRequest); complaintMessageQueueRepository.save(enrichedSevaRequest); } }
ComplaintAssignmentListener { @KafkaListener(topics = "${kafka.topics.pgr.locationpopulated.name}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); SevaRequest enrichedSevaRequest = null; if (sevaRequest.getKeyword() != null && sevaRequest.getKeyword().equalsIgnoreCase(DELIVERABLE_SERVICE) && !sevaRequest.getKeyword().equalsIgnoreCase(COMPLAINT)) enrichedSevaRequest = commonworkflowService.enrichWorkflow(sevaRequest); else enrichedSevaRequest = workflowService.enrichWorkflow(sevaRequest); positionService.enrichRequestWithPosition(enrichedSevaRequest); escalationDateService.enrichRequestWithEscalationDate(enrichedSevaRequest); complaintMessageQueueRepository.save(enrichedSevaRequest); } @Autowired  ComplaintAssignmentListener(ComplaintMessageQueueRepository complaintMessageQueueRepository,
			WorkflowService workflowService, CommonWorkflowService commonworkflowService,
			EscalationDateService escalationDateService, PositionService positionService); }
ComplaintAssignmentListener { @KafkaListener(topics = "${kafka.topics.pgr.locationpopulated.name}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); SevaRequest enrichedSevaRequest = null; if (sevaRequest.getKeyword() != null && sevaRequest.getKeyword().equalsIgnoreCase(DELIVERABLE_SERVICE) && !sevaRequest.getKeyword().equalsIgnoreCase(COMPLAINT)) enrichedSevaRequest = commonworkflowService.enrichWorkflow(sevaRequest); else enrichedSevaRequest = workflowService.enrichWorkflow(sevaRequest); positionService.enrichRequestWithPosition(enrichedSevaRequest); escalationDateService.enrichRequestWithEscalationDate(enrichedSevaRequest); complaintMessageQueueRepository.save(enrichedSevaRequest); } @Autowired  ComplaintAssignmentListener(ComplaintMessageQueueRepository complaintMessageQueueRepository,
			WorkflowService workflowService, CommonWorkflowService commonworkflowService,
			EscalationDateService escalationDateService, PositionService positionService); @KafkaListener(topics = "${kafka.topics.pgr.locationpopulated.name}") void process(HashMap<String, Object> sevaRequestMap); }
ComplaintAssignmentListener { @KafkaListener(topics = "${kafka.topics.pgr.locationpopulated.name}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); SevaRequest enrichedSevaRequest = null; if (sevaRequest.getKeyword() != null && sevaRequest.getKeyword().equalsIgnoreCase(DELIVERABLE_SERVICE) && !sevaRequest.getKeyword().equalsIgnoreCase(COMPLAINT)) enrichedSevaRequest = commonworkflowService.enrichWorkflow(sevaRequest); else enrichedSevaRequest = workflowService.enrichWorkflow(sevaRequest); positionService.enrichRequestWithPosition(enrichedSevaRequest); escalationDateService.enrichRequestWithEscalationDate(enrichedSevaRequest); complaintMessageQueueRepository.save(enrichedSevaRequest); } @Autowired  ComplaintAssignmentListener(ComplaintMessageQueueRepository complaintMessageQueueRepository,
			WorkflowService workflowService, CommonWorkflowService commonworkflowService,
			EscalationDateService escalationDateService, PositionService positionService); @KafkaListener(topics = "${kafka.topics.pgr.locationpopulated.name}") void process(HashMap<String, Object> sevaRequestMap); static final String DELIVERABLE_SERVICE; static final String COMPLAINT; }