@Test public void testAddToQue() { Mockito.doNothing().when(accountDetailKeyQueueRepository).add(Mockito.any()); AccountDetailKeyRequest request = new AccountDetailKeyRequest(); request.setRequestInfo(getRequestInfo()); request.setAccountDetailKeys(new ArrayList<AccountDetailKeyContract>()); request.getAccountDetailKeys().add(getAccountDetailKeyContract()); accountDetailKeyRepository.addToQue(request); Map<String, Object> message = new HashMap<>(); message.put("accountdetailkey_create", request); Mockito.verify(accountDetailKeyQueueRepository).add(message); }
public void addToQue(AccountDetailKeyRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailkey_create", request); } else { message.put("accountdetailkey_update", request); } accountDetailKeyQueueRepository.add(message); }
AccountDetailKeyRepository { public void addToQue(AccountDetailKeyRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailkey_create", request); } else { message.put("accountdetailkey_update", request); } accountDetailKeyQueueRepository.add(message); } }
AccountDetailKeyRepository { public void addToQue(AccountDetailKeyRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailkey_create", request); } else { message.put("accountdetailkey_update", request); } accountDetailKeyQueueRepository.add(message); } @Autowired  AccountDetailKeyRepository(AccountDetailKeyJdbcRepository accountDetailKeyJdbcRepository,
			MastersQueueRepository accountDetailKeyQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountDetailKeyESRepository accountDetailKeyESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); }
AccountDetailKeyRepository { public void addToQue(AccountDetailKeyRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailkey_create", request); } else { message.put("accountdetailkey_update", request); } accountDetailKeyQueueRepository.add(message); } @Autowired  AccountDetailKeyRepository(AccountDetailKeyJdbcRepository accountDetailKeyJdbcRepository,
			MastersQueueRepository accountDetailKeyQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountDetailKeyESRepository accountDetailKeyESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); @Transactional List<AccountDetailKey> save(List<AccountDetailKey> accountDetailKies, RequestInfo requestInfo); @Transactional List<AccountDetailKey> update(List<AccountDetailKey> accountDetailKies, RequestInfo requestInfo); void addToQue(AccountDetailKeyRequest request); void addToSearchQueue(AccountDetailKeyRequest request); AccountDetailKey findById(AccountDetailKey accountDetailKey); String getNextSequence(); @Transactional AccountDetailKey save(AccountDetailKey accountDetailKey); @Transactional AccountDetailKey update(AccountDetailKey accountDetailKey); void add(AccountDetailKeyRequest request); Pagination<AccountDetailKey> search(final AccountDetailKeySearch domain); boolean uniqueCheck(String fieldName, AccountDetailKey accountDetailKey); }
AccountDetailKeyRepository { public void addToQue(AccountDetailKeyRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailkey_create", request); } else { message.put("accountdetailkey_update", request); } accountDetailKeyQueueRepository.add(message); } @Autowired  AccountDetailKeyRepository(AccountDetailKeyJdbcRepository accountDetailKeyJdbcRepository,
			MastersQueueRepository accountDetailKeyQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountDetailKeyESRepository accountDetailKeyESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); @Transactional List<AccountDetailKey> save(List<AccountDetailKey> accountDetailKies, RequestInfo requestInfo); @Transactional List<AccountDetailKey> update(List<AccountDetailKey> accountDetailKies, RequestInfo requestInfo); void addToQue(AccountDetailKeyRequest request); void addToSearchQueue(AccountDetailKeyRequest request); AccountDetailKey findById(AccountDetailKey accountDetailKey); String getNextSequence(); @Transactional AccountDetailKey save(AccountDetailKey accountDetailKey); @Transactional AccountDetailKey update(AccountDetailKey accountDetailKey); void add(AccountDetailKeyRequest request); Pagination<AccountDetailKey> search(final AccountDetailKeySearch domain); boolean uniqueCheck(String fieldName, AccountDetailKey accountDetailKey);  }