@Test public void test_should_perist_enriched_seva_request() { final HashMap<String, Object> sevaRequest = getSevaRequestMap(); final SevaRequest enrichedSevaRequest = new SevaRequest(new HashMap<>()); when(locationService.enrich(any())).thenReturn(enrichedSevaRequest); listener.process(sevaRequest); verify(complaintRepository).save(enrichedSevaRequest); }
@KafkaListener(id = "${kafka.topics.pgr.validated.id}", topics = "${kafka.topics.pgr.validated.name}", group = "${kafka.topics.pgr.validated.group}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); final SevaRequest enrichedSevaRequest = locationService.enrich(sevaRequest); complaintRepository.save(enrichedSevaRequest); }
GrievanceLocationEnrichmentListener { @KafkaListener(id = "${kafka.topics.pgr.validated.id}", topics = "${kafka.topics.pgr.validated.name}", group = "${kafka.topics.pgr.validated.group}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); final SevaRequest enrichedSevaRequest = locationService.enrich(sevaRequest); complaintRepository.save(enrichedSevaRequest); } }
GrievanceLocationEnrichmentListener { @KafkaListener(id = "${kafka.topics.pgr.validated.id}", topics = "${kafka.topics.pgr.validated.name}", group = "${kafka.topics.pgr.validated.group}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); final SevaRequest enrichedSevaRequest = locationService.enrich(sevaRequest); complaintRepository.save(enrichedSevaRequest); } @Autowired  GrievanceLocationEnrichmentListener(LocationService locationService,
                                               ComplaintRepository complaintRepository); }
GrievanceLocationEnrichmentListener { @KafkaListener(id = "${kafka.topics.pgr.validated.id}", topics = "${kafka.topics.pgr.validated.name}", group = "${kafka.topics.pgr.validated.group}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); final SevaRequest enrichedSevaRequest = locationService.enrich(sevaRequest); complaintRepository.save(enrichedSevaRequest); } @Autowired  GrievanceLocationEnrichmentListener(LocationService locationService,
                                               ComplaintRepository complaintRepository); @KafkaListener(id = "${kafka.topics.pgr.validated.id}", topics = "${kafka.topics.pgr.validated.name}", group = "${kafka.topics.pgr.validated.group}") void process(HashMap<String, Object> sevaRequestMap); }
GrievanceLocationEnrichmentListener { @KafkaListener(id = "${kafka.topics.pgr.validated.id}", topics = "${kafka.topics.pgr.validated.name}", group = "${kafka.topics.pgr.validated.group}") public void process(HashMap<String, Object> sevaRequestMap) { final SevaRequest sevaRequest = new SevaRequest(sevaRequestMap); final SevaRequest enrichedSevaRequest = locationService.enrich(sevaRequest); complaintRepository.save(enrichedSevaRequest); } @Autowired  GrievanceLocationEnrichmentListener(LocationService locationService,
                                               ComplaintRepository complaintRepository); @KafkaListener(id = "${kafka.topics.pgr.validated.id}", topics = "${kafka.topics.pgr.validated.name}", group = "${kafka.topics.pgr.validated.group}") void process(HashMap<String, Object> sevaRequestMap);  }