@Test public void test_add_to_search_queue() { InstrumentTypeRequest request = new InstrumentTypeRequest(); request.setInstrumentTypes(getInstrumentTypes()); instrumentTypeQueueRepository.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("instrumenttype_persisted")); }
public void addToSearchQue(InstrumentTypeRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstrumentTypes().isEmpty()) { topicMap.put("instrumenttype_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentTypeCompletedKey, topicMap); }
InstrumentTypeQueueRepository { public void addToSearchQue(InstrumentTypeRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstrumentTypes().isEmpty()) { topicMap.put("instrumenttype_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentTypeCompletedKey, topicMap); } }
InstrumentTypeQueueRepository { public void addToSearchQue(InstrumentTypeRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstrumentTypes().isEmpty()) { topicMap.put("instrumenttype_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentTypeCompletedKey, topicMap); } @Autowired  InstrumentTypeQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.type.validated.key}") String instrumentTypeValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.type.completed.key}") String instrumentTypeCompletedKey); }
InstrumentTypeQueueRepository { public void addToSearchQue(InstrumentTypeRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstrumentTypes().isEmpty()) { topicMap.put("instrumenttype_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentTypeCompletedKey, topicMap); } @Autowired  InstrumentTypeQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.type.validated.key}") String instrumentTypeValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.type.completed.key}") String instrumentTypeCompletedKey); void addToQue(InstrumentTypeRequest request); void addToSearchQue(InstrumentTypeRequest request); }
InstrumentTypeQueueRepository { public void addToSearchQue(InstrumentTypeRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstrumentTypes().isEmpty()) { topicMap.put("instrumenttype_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentTypeCompletedKey, topicMap); } @Autowired  InstrumentTypeQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.type.validated.key}") String instrumentTypeValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.type.completed.key}") String instrumentTypeCompletedKey); void addToQue(InstrumentTypeRequest request); void addToSearchQue(InstrumentTypeRequest request);  }