@Test public void testAddToSearchQueue() { Mockito.doNothing().when(functionQueueRepository).add(Mockito.any()); FunctionRequest request = new FunctionRequest(); request.setRequestInfo(getRequestInfo()); request.setFunctions(new ArrayList<FunctionContract>()); request.getFunctions().add(getFunctionContract()); functionRepository.addToSearchQueue(request); Map<String, Object> message = new HashMap<>(); message.put("function_persisted", request); Mockito.verify(functionQueueRepository).addToSearch(message); }
public void addToSearchQueue(FunctionRequest request) { Map<String, Object> message = new HashMap<>(); message.put("function_persisted", request); functionQueueRepository.addToSearch(message); }
FunctionRepository { public void addToSearchQueue(FunctionRequest request) { Map<String, Object> message = new HashMap<>(); message.put("function_persisted", request); functionQueueRepository.addToSearch(message); } }
FunctionRepository { public void addToSearchQueue(FunctionRequest request) { Map<String, Object> message = new HashMap<>(); message.put("function_persisted", request); functionQueueRepository.addToSearch(message); } @Autowired  FunctionRepository(FunctionJdbcRepository functionJdbcRepository,
			MastersQueueRepository functionQueueRepository, FinancialConfigurationService financialConfigurationService,
			FunctionESRepository functionESRepository, @Value("${persist.through.kafka}") String persistThroughKafka); }
FunctionRepository { public void addToSearchQueue(FunctionRequest request) { Map<String, Object> message = new HashMap<>(); message.put("function_persisted", request); functionQueueRepository.addToSearch(message); } @Autowired  FunctionRepository(FunctionJdbcRepository functionJdbcRepository,
			MastersQueueRepository functionQueueRepository, FinancialConfigurationService financialConfigurationService,
			FunctionESRepository functionESRepository, @Value("${persist.through.kafka}") String persistThroughKafka); @Transactional List<Function> save(List<Function> functions, RequestInfo requestInfo); @Transactional List<Function> update(List<Function> functions, RequestInfo requestInfo); String getNextSequence(); Function findById(Function function); @Transactional Function save(Function function); @Transactional Function update(Function function); void addToQue(FunctionRequest request); void addToSearchQueue(FunctionRequest request); Pagination<Function> search(FunctionSearch domain); boolean uniqueCheck(String fieldName, Function function); }
FunctionRepository { public void addToSearchQueue(FunctionRequest request) { Map<String, Object> message = new HashMap<>(); message.put("function_persisted", request); functionQueueRepository.addToSearch(message); } @Autowired  FunctionRepository(FunctionJdbcRepository functionJdbcRepository,
			MastersQueueRepository functionQueueRepository, FinancialConfigurationService financialConfigurationService,
			FunctionESRepository functionESRepository, @Value("${persist.through.kafka}") String persistThroughKafka); @Transactional List<Function> save(List<Function> functions, RequestInfo requestInfo); @Transactional List<Function> update(List<Function> functions, RequestInfo requestInfo); String getNextSequence(); Function findById(Function function); @Transactional Function save(Function function); @Transactional Function update(Function function); void addToQue(FunctionRequest request); void addToSearchQueue(FunctionRequest request); Pagination<Function> search(FunctionSearch domain); boolean uniqueCheck(String fieldName, Function function);  }