@Test public void testAddToSearchQueue() { Mockito.doNothing().when(bankAccountQueueRepository).add(Mockito.any()); BankAccountRequest request = new BankAccountRequest(); request.setRequestInfo(getRequestInfo()); request.setBankAccounts(new ArrayList<BankAccountContract>()); request.getBankAccounts().add(getBankAccountContract()); bankAccountRepository.addToSearchQueue(request); Map<String, Object> message = new HashMap<>(); message.put("bankaccount_persisted", request); Mockito.verify(bankAccountQueueRepository).addToSearch(message); }
public void addToSearchQueue(BankAccountRequest request) { Map<String, Object> message = new HashMap<>(); message.put("bankaccount_persisted", request); bankAccountQueueRepository.addToSearch(message); }
BankAccountRepository { public void addToSearchQueue(BankAccountRequest request) { Map<String, Object> message = new HashMap<>(); message.put("bankaccount_persisted", request); bankAccountQueueRepository.addToSearch(message); } }
BankAccountRepository { public void addToSearchQueue(BankAccountRequest request) { Map<String, Object> message = new HashMap<>(); message.put("bankaccount_persisted", request); bankAccountQueueRepository.addToSearch(message); } @Autowired  BankAccountRepository(BankAccountJdbcRepository bankAccountJdbcRepository,
			MastersQueueRepository bankAccountQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			BankAccountESRepository bankAccountESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); }
BankAccountRepository { public void addToSearchQueue(BankAccountRequest request) { Map<String, Object> message = new HashMap<>(); message.put("bankaccount_persisted", request); bankAccountQueueRepository.addToSearch(message); } @Autowired  BankAccountRepository(BankAccountJdbcRepository bankAccountJdbcRepository,
			MastersQueueRepository bankAccountQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			BankAccountESRepository bankAccountESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); BankAccount findById(BankAccount bankAccount); String getNextSequence(); @Transactional BankAccount save(BankAccount bankAccount); @Transactional BankAccount update(BankAccount bankAccount); boolean uniqueCheck(String fieldName, BankAccount bankAccount); void add(BankAccountRequest request); Pagination<BankAccount> search(BankAccountSearch domain); @Transactional List<BankAccount> save(List<BankAccount> bankAccounts, RequestInfo requestInfo); @Transactional List<BankAccount> update(List<BankAccount> bankAccounts, RequestInfo requestInfo); void addToQue(BankAccountRequest request); void addToSearchQueue(BankAccountRequest request); }
BankAccountRepository { public void addToSearchQueue(BankAccountRequest request) { Map<String, Object> message = new HashMap<>(); message.put("bankaccount_persisted", request); bankAccountQueueRepository.addToSearch(message); } @Autowired  BankAccountRepository(BankAccountJdbcRepository bankAccountJdbcRepository,
			MastersQueueRepository bankAccountQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			BankAccountESRepository bankAccountESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); BankAccount findById(BankAccount bankAccount); String getNextSequence(); @Transactional BankAccount save(BankAccount bankAccount); @Transactional BankAccount update(BankAccount bankAccount); boolean uniqueCheck(String fieldName, BankAccount bankAccount); void add(BankAccountRequest request); Pagination<BankAccount> search(BankAccountSearch domain); @Transactional List<BankAccount> save(List<BankAccount> bankAccounts, RequestInfo requestInfo); @Transactional List<BankAccount> update(List<BankAccount> bankAccounts, RequestInfo requestInfo); void addToQue(BankAccountRequest request); void addToSearchQueue(BankAccountRequest request);  }