@Test public void test_add_to_search_queue() { final BudgetRequest request = new BudgetRequest(); request.setBudgets(getBudgetContracts()); budgetQueueRepository.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("budget_persisted")); }
public void addToSearchQue(final BudgetRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgets().isEmpty()) { topicMap.put("budget_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetCompletedKey, topicMap); }
BudgetQueueRepository { public void addToSearchQue(final BudgetRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgets().isEmpty()) { topicMap.put("budget_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetCompletedKey, topicMap); } }
BudgetQueueRepository { public void addToSearchQue(final BudgetRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgets().isEmpty()) { topicMap.put("budget_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetCompletedKey, topicMap); } @Autowired  BudgetQueueRepository(final FinancialProducer financialProducer,
            @Value("${kafka.topics.egf.budget.service.validated.topic}") final String validatedTopic,
            @Value("${kafka.topics.egf.budget.budget.validated.key}") final String budgetValidatedKey,
            @Value("${kafka.topics.egf.budget.service.completed.topic}") final String completedTopic,
            @Value("${kafka.topics.egf.budget.budget.completed.key}") final String budgetCompletedKey); }
BudgetQueueRepository { public void addToSearchQue(final BudgetRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgets().isEmpty()) { topicMap.put("budget_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetCompletedKey, topicMap); } @Autowired  BudgetQueueRepository(final FinancialProducer financialProducer,
            @Value("${kafka.topics.egf.budget.service.validated.topic}") final String validatedTopic,
            @Value("${kafka.topics.egf.budget.budget.validated.key}") final String budgetValidatedKey,
            @Value("${kafka.topics.egf.budget.service.completed.topic}") final String completedTopic,
            @Value("${kafka.topics.egf.budget.budget.completed.key}") final String budgetCompletedKey); void addToQue(final BudgetRequest request); void addToSearchQue(final BudgetRequest request); }
BudgetQueueRepository { public void addToSearchQue(final BudgetRequest request) { final HashMap<String, Object> topicMap = new HashMap<String, Object>(); if (!request.getBudgets().isEmpty()) { topicMap.put("budget_persisted", request); System.out.println("push search topic" + request); } financialProducer.sendMessage(completedTopic, budgetCompletedKey, topicMap); } @Autowired  BudgetQueueRepository(final FinancialProducer financialProducer,
            @Value("${kafka.topics.egf.budget.service.validated.topic}") final String validatedTopic,
            @Value("${kafka.topics.egf.budget.budget.validated.key}") final String budgetValidatedKey,
            @Value("${kafka.topics.egf.budget.service.completed.topic}") final String completedTopic,
            @Value("${kafka.topics.egf.budget.budget.completed.key}") final String budgetCompletedKey); void addToQue(final BudgetRequest request); void addToSearchQue(final BudgetRequest request);  }