@Test public void test_add_to_search_queue() { SurrenderReasonRequest request = new SurrenderReasonRequest(); request.setSurrenderReasons(getSurrenderReasons()); surrenderReasonQueueRepository.addToSearchQue(request); final ArgumentCaptor<HashMap> argumentCaptor = ArgumentCaptor.forClass(HashMap.class); verify(financialInstrumentProducer).sendMessage(any(String.class), any(String.class), argumentCaptor.capture()); final HashMap<String, Object> actualRequest = argumentCaptor.getValue(); assertEquals(request, actualRequest.get("surrenderreason_persisted")); }
public void addToSearchQue(SurrenderReasonRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getSurrenderReasons().isEmpty()) { topicMap.put("surrenderreason_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, surrenderReasonCompletedKey, topicMap); }
SurrenderReasonQueueRepository { public void addToSearchQue(SurrenderReasonRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getSurrenderReasons().isEmpty()) { topicMap.put("surrenderreason_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, surrenderReasonCompletedKey, topicMap); } }
SurrenderReasonQueueRepository { public void addToSearchQue(SurrenderReasonRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getSurrenderReasons().isEmpty()) { topicMap.put("surrenderreason_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, surrenderReasonCompletedKey, topicMap); } @Autowired  SurrenderReasonQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.surrender.reason.validated.key}") String surrenderReasonValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.surrender.reason.completed.key}") String surrenderReasonCompletedKey); }
SurrenderReasonQueueRepository { public void addToSearchQue(SurrenderReasonRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getSurrenderReasons().isEmpty()) { topicMap.put("surrenderreason_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, surrenderReasonCompletedKey, topicMap); } @Autowired  SurrenderReasonQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.surrender.reason.validated.key}") String surrenderReasonValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.surrender.reason.completed.key}") String surrenderReasonCompletedKey); void addToQue(SurrenderReasonRequest request); void addToSearchQue(SurrenderReasonRequest request); }
SurrenderReasonQueueRepository { public void addToSearchQue(SurrenderReasonRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getSurrenderReasons().isEmpty()) { topicMap.put("surrenderreason_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, surrenderReasonCompletedKey, topicMap); } @Autowired  SurrenderReasonQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.surrender.reason.validated.key}") String surrenderReasonValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.surrender.reason.completed.key}") String surrenderReasonCompletedKey); void addToQue(SurrenderReasonRequest request); void addToSearchQue(SurrenderReasonRequest request);  }