@Test public void test_add_to_search_queue() { final BudgetDetailRequest request = new BudgetDetailRequest(); request.setBudgetDetails(getBudgetDetails()); budgetDetailQueueRepository.addToSearchQue(request); final ArgumentCaptor<HashMap> argumentCaptor = ArgumentCaptor.forClass(HashMap.class); verify(financialProducer).sendMessage(any(String.class), any(String.class), argumentCaptor.capture()); final HashMap<String, Object> actualRequest = argumentCaptor.getValue(); assertEquals(request, actualRequest.get("budgetdetail_persisted")); }
public void addToSearchQue(final BudgetDetailRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgetDetails().isEmpty()) { topicMap.put("budgetdetail_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetDetailCompletedKey, topicMap); }
BudgetDetailQueueRepository { public void addToSearchQue(final BudgetDetailRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgetDetails().isEmpty()) { topicMap.put("budgetdetail_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetDetailCompletedKey, topicMap); } }
BudgetDetailQueueRepository { public void addToSearchQue(final BudgetDetailRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgetDetails().isEmpty()) { topicMap.put("budgetdetail_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetDetailCompletedKey, topicMap); } @Autowired  BudgetDetailQueueRepository(final FinancialProducer financialProducer,
            @Value("${kafka.topics.egf.budget.service.validated.topic}") final String validatedTopic,
            @Value("${kafka.topics.egf.budget.budgetdetail.validated.key}") final String budgetDetailValidatedKey,
            @Value("${kafka.topics.egf.budget.service.completed.topic}") final String completedTopic,
            @Value("${kafka.topics.egf.budget.budgetdetail.completed.key}") final String budgetDetailCompletedKey); }
BudgetDetailQueueRepository { public void addToSearchQue(final BudgetDetailRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgetDetails().isEmpty()) { topicMap.put("budgetdetail_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetDetailCompletedKey, topicMap); } @Autowired  BudgetDetailQueueRepository(final FinancialProducer financialProducer,
            @Value("${kafka.topics.egf.budget.service.validated.topic}") final String validatedTopic,
            @Value("${kafka.topics.egf.budget.budgetdetail.validated.key}") final String budgetDetailValidatedKey,
            @Value("${kafka.topics.egf.budget.service.completed.topic}") final String completedTopic,
            @Value("${kafka.topics.egf.budget.budgetdetail.completed.key}") final String budgetDetailCompletedKey); void addToQue(final BudgetDetailRequest request); void addToSearchQue(final BudgetDetailRequest request); }
BudgetDetailQueueRepository { public void addToSearchQue(final BudgetDetailRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgetDetails().isEmpty()) { topicMap.put("budgetdetail_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetDetailCompletedKey, topicMap); } @Autowired  BudgetDetailQueueRepository(final FinancialProducer financialProducer,
            @Value("${kafka.topics.egf.budget.service.validated.topic}") final String validatedTopic,
            @Value("${kafka.topics.egf.budget.budgetdetail.validated.key}") final String budgetDetailValidatedKey,
            @Value("${kafka.topics.egf.budget.service.completed.topic}") final String completedTopic,
            @Value("${kafka.topics.egf.budget.budgetdetail.completed.key}") final String budgetDetailCompletedKey); void addToQue(final BudgetDetailRequest request); void addToSearchQue(final BudgetDetailRequest request);  }