@Test public void testAddToQue() { Mockito.doNothing().when(accountDetailTypeQueueRepository).add(Mockito.any()); AccountDetailTypeRequest request = new AccountDetailTypeRequest(); request.setRequestInfo(getRequestInfo()); request.setAccountDetailTypes(new ArrayList<AccountDetailTypeContract>()); request.getAccountDetailTypes().add(getAccountDetailTypeContract()); accountDetailTypeRepository.addToQue(request); Map<String, Object> message = new HashMap<>(); message.put("accountdetailtype_create", request); Mockito.verify(accountDetailTypeQueueRepository).add(message); }
public void addToQue(AccountDetailTypeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailtype_create", request); } else { message.put("accountdetailtype_update", request); } accountDetailTypeQueueRepository.add(message); }
AccountDetailTypeRepository { public void addToQue(AccountDetailTypeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailtype_create", request); } else { message.put("accountdetailtype_update", request); } accountDetailTypeQueueRepository.add(message); } }
AccountDetailTypeRepository { public void addToQue(AccountDetailTypeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailtype_create", request); } else { message.put("accountdetailtype_update", request); } accountDetailTypeQueueRepository.add(message); } @Autowired  AccountDetailTypeRepository(AccountDetailTypeJdbcRepository accountDetailTypeJdbcRepository,
			MastersQueueRepository accountDetailTypeQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountDetailTypeESRepository accountDetailTypeESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); }
AccountDetailTypeRepository { public void addToQue(AccountDetailTypeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailtype_create", request); } else { message.put("accountdetailtype_update", request); } accountDetailTypeQueueRepository.add(message); } @Autowired  AccountDetailTypeRepository(AccountDetailTypeJdbcRepository accountDetailTypeJdbcRepository,
			MastersQueueRepository accountDetailTypeQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountDetailTypeESRepository accountDetailTypeESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); @Transactional List<AccountDetailType> save(List<AccountDetailType> accountDetailTypes, RequestInfo requestInfo); @Transactional List<AccountDetailType> update(List<AccountDetailType> accountDetailTypes, RequestInfo requestInfo); AccountDetailType findById(AccountDetailType accountDetailType); String getNextSequence(); @Transactional AccountDetailType save(AccountDetailType accountDetailType); @Transactional AccountDetailType update(AccountDetailType accountDetailType); void add(AccountDetailTypeRequest request); Pagination<AccountDetailType> search(AccountDetailTypeSearch domain); void addToQue(AccountDetailTypeRequest request); void addToSearchQueue(AccountDetailTypeRequest request); boolean uniqueCheck(String fieldName, AccountDetailType accountDetailType); }
AccountDetailTypeRepository { public void addToQue(AccountDetailTypeRequest request) { Map<String, Object> message = new HashMap<>(); if (request.getRequestInfo().getAction().equalsIgnoreCase(Constants.ACTION_CREATE)) { message.put("accountdetailtype_create", request); } else { message.put("accountdetailtype_update", request); } accountDetailTypeQueueRepository.add(message); } @Autowired  AccountDetailTypeRepository(AccountDetailTypeJdbcRepository accountDetailTypeJdbcRepository,
			MastersQueueRepository accountDetailTypeQueueRepository,
			FinancialConfigurationService financialConfigurationService,
			AccountDetailTypeESRepository accountDetailTypeESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka); @Transactional List<AccountDetailType> save(List<AccountDetailType> accountDetailTypes, RequestInfo requestInfo); @Transactional List<AccountDetailType> update(List<AccountDetailType> accountDetailTypes, RequestInfo requestInfo); AccountDetailType findById(AccountDetailType accountDetailType); String getNextSequence(); @Transactional AccountDetailType save(AccountDetailType accountDetailType); @Transactional AccountDetailType update(AccountDetailType accountDetailType); void add(AccountDetailTypeRequest request); Pagination<AccountDetailType> search(AccountDetailTypeSearch domain); void addToQue(AccountDetailTypeRequest request); void addToSearchQueue(AccountDetailTypeRequest request); boolean uniqueCheck(String fieldName, AccountDetailType accountDetailType);  }