@Test public void test_should_persist_compliant() { final ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setTimeZone(TimeZone.getTimeZone(IST)); final GrievancePersistenceListener listener = new GrievancePersistenceListener(complaintWriteService, objectMapper); final HashMap<String, Object> sevaRequestMap = SevaRequestMapFactory.create(); listener.processMessage(sevaRequestMap); verify(complaintWriteService).updateOrInsert(any(ServiceRequestRecord.class)); }
@KafkaListener(topics = "${kafka.topics.pgr.workflowupdated.name}") public void processMessage(HashMap<String, Object> sevaRequestMap) { SevaRequest sevaRequest = new SevaRequest(sevaRequestMap, objectMapper); complaintWriteService.updateOrInsert(sevaRequest.toDomain()); }
GrievancePersistenceListener { @KafkaListener(topics = "${kafka.topics.pgr.workflowupdated.name}") public void processMessage(HashMap<String, Object> sevaRequestMap) { SevaRequest sevaRequest = new SevaRequest(sevaRequestMap, objectMapper); complaintWriteService.updateOrInsert(sevaRequest.toDomain()); } }
GrievancePersistenceListener { @KafkaListener(topics = "${kafka.topics.pgr.workflowupdated.name}") public void processMessage(HashMap<String, Object> sevaRequestMap) { SevaRequest sevaRequest = new SevaRequest(sevaRequestMap, objectMapper); complaintWriteService.updateOrInsert(sevaRequest.toDomain()); } GrievancePersistenceListener(ServiceRequestWriteService complaintWriteService,
                                        ObjectMapper objectMapper); }
GrievancePersistenceListener { @KafkaListener(topics = "${kafka.topics.pgr.workflowupdated.name}") public void processMessage(HashMap<String, Object> sevaRequestMap) { SevaRequest sevaRequest = new SevaRequest(sevaRequestMap, objectMapper); complaintWriteService.updateOrInsert(sevaRequest.toDomain()); } GrievancePersistenceListener(ServiceRequestWriteService complaintWriteService,
                                        ObjectMapper objectMapper); @KafkaListener(topics = "${kafka.topics.pgr.workflowupdated.name}") void processMessage(HashMap<String, Object> sevaRequestMap); }
GrievancePersistenceListener { @KafkaListener(topics = "${kafka.topics.pgr.workflowupdated.name}") public void processMessage(HashMap<String, Object> sevaRequestMap) { SevaRequest sevaRequest = new SevaRequest(sevaRequestMap, objectMapper); complaintWriteService.updateOrInsert(sevaRequest.toDomain()); } GrievancePersistenceListener(ServiceRequestWriteService complaintWriteService,
                                        ObjectMapper objectMapper); @KafkaListener(topics = "${kafka.topics.pgr.workflowupdated.name}") void processMessage(HashMap<String, Object> sevaRequestMap);  }