@Test public void testAddToQue() { Mockito.doNothing().when(accountCodePurposeQueueRepository).add(Mockito.any()); AccountCodePurposeRequest request = new AccountCodePurposeRequest(); request.setRequestInfo(getRequestInfo()); request.setAccountCodePurposes(new ArrayList<AccountCodePurposeContract>()); request.getAccountCodePurposes().add(getAccountCodePurposeContract()); accountCodePurposeRepository.addToQue(request); Map<String, Object> message = new HashMap<>(); message.put("accountcodepurpose_create", request); Mockito.verify(accountCodePurposeQueueRepository).add(message); }
public void addToQue(AccountCodePurposeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountcodepurpose_create", request); } else { message.put("accountcodepurpose_update", request); } accountCodePurposeQueueRepository.add(message); }
AccountCodePurposeRepository { public void addToQue(AccountCodePurposeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountcodepurpose_create", request); } else { message.put("accountcodepurpose_update", request); } accountCodePurposeQueueRepository.add(message); } }
AccountCodePurposeRepository { public void addToQue(AccountCodePurposeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountcodepurpose_create", request); } else { message.put("accountcodepurpose_update", request); } accountCodePurposeQueueRepository.add(message); } @Autowired  AccountCodePurposeRepository(AccountCodePurposeJdbcRepository accountCodePurposeJdbcRepository,
			MastersQueueRepository accountCodePurposeQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountCodePurposeESRepository accountCodePurposeESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); }
AccountCodePurposeRepository { public void addToQue(AccountCodePurposeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountcodepurpose_create", request); } else { message.put("accountcodepurpose_update", request); } accountCodePurposeQueueRepository.add(message); } @Autowired  AccountCodePurposeRepository(AccountCodePurposeJdbcRepository accountCodePurposeJdbcRepository,
			MastersQueueRepository accountCodePurposeQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountCodePurposeESRepository accountCodePurposeESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); AccountCodePurpose findById(AccountCodePurpose accountCodePurpose); String getNextSequence(); @Transactional AccountCodePurpose save(AccountCodePurpose accountCodePurpose); @Transactional AccountCodePurpose update(AccountCodePurpose accountCodePurpose); @Transactional List<AccountCodePurpose> save(List<AccountCodePurpose> accountCodePurposes, RequestInfo requestInfo); @Transactional List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, RequestInfo requestInfo); void add(AccountCodePurposeRequest request); Pagination<AccountCodePurpose> search(AccountCodePurposeSearch domain); void uniqueCheck(AccountCodePurpose accountCodePurpose); Boolean uniqueCheck(String fieldName, AccountCodePurpose accountCodePurpose); void addToQue(AccountCodePurposeRequest request); void addToSearchQueue(AccountCodePurposeRequest request); }
AccountCodePurposeRepository { public void addToQue(AccountCodePurposeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountcodepurpose_create", request); } else { message.put("accountcodepurpose_update", request); } accountCodePurposeQueueRepository.add(message); } @Autowired  AccountCodePurposeRepository(AccountCodePurposeJdbcRepository accountCodePurposeJdbcRepository,
			MastersQueueRepository accountCodePurposeQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountCodePurposeESRepository accountCodePurposeESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); AccountCodePurpose findById(AccountCodePurpose accountCodePurpose); String getNextSequence(); @Transactional AccountCodePurpose save(AccountCodePurpose accountCodePurpose); @Transactional AccountCodePurpose update(AccountCodePurpose accountCodePurpose); @Transactional List<AccountCodePurpose> save(List<AccountCodePurpose> accountCodePurposes, RequestInfo requestInfo); @Transactional List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, RequestInfo requestInfo); void add(AccountCodePurposeRequest request); Pagination<AccountCodePurpose> search(AccountCodePurposeSearch domain); void uniqueCheck(AccountCodePurpose accountCodePurpose); Boolean uniqueCheck(String fieldName, AccountCodePurpose accountCodePurpose); void addToQue(AccountCodePurposeRequest request); void addToSearchQueue(AccountCodePurposeRequest request);  }