@Test public void test_add_to_search_queue() { InstrumentRequest request = new InstrumentRequest(); request.setInstruments(getInstruments()); instrumentQueueRepository.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("instrument_persisted")); }
public void addToSearchQue(InstrumentRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstruments().isEmpty()) { topicMap.put("instrument_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentCompletedKey, topicMap); }
InstrumentQueueRepository { public void addToSearchQue(InstrumentRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstruments().isEmpty()) { topicMap.put("instrument_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentCompletedKey, topicMap); } }
InstrumentQueueRepository { public void addToSearchQue(InstrumentRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstruments().isEmpty()) { topicMap.put("instrument_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentCompletedKey, topicMap); } @Autowired  InstrumentQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.validated.key}") String instrumentValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.completed.key}") String instrumentCompletedKey); }
InstrumentQueueRepository { public void addToSearchQue(InstrumentRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstruments().isEmpty()) { topicMap.put("instrument_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentCompletedKey, topicMap); } @Autowired  InstrumentQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.validated.key}") String instrumentValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.completed.key}") String instrumentCompletedKey); void addToQue(InstrumentRequest request); void addToSearchQue(InstrumentRequest request); }
InstrumentQueueRepository { public void addToSearchQue(InstrumentRequest request) { HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getInstruments().isEmpty()) { topicMap.put("instrument_persisted", request); System.out.println("push search topic" + request); } financialInstrumentProducer.sendMessage(completedTopic, instrumentCompletedKey, topicMap); } @Autowired  InstrumentQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.validated.key}") String instrumentValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.completed.key}") String instrumentCompletedKey); void addToQue(InstrumentRequest request); void addToSearchQue(InstrumentRequest request);  }