@Test public void test_to_send_message_to_Kafka(){ agreementMessageQueueRepository.save(getAgreementRequest(), UPDATE); verify(kafkaTemplate).send(any(), any(), any()); }
public void save(AgreementRequest agreementRequest, String action) { try { Agreement agreement = agreementRequest.getAgreement(); logger.info("agreement before sending" + agreement); kafkaTemplate.send(getTopicName(action), KEY, agreementRequest); } catch (Exception exception) { logger.info("AgreementService : " + exception.getMessage(), exception); throw exception; } }
AgreementMessageQueueRepository { public void save(AgreementRequest agreementRequest, String action) { try { Agreement agreement = agreementRequest.getAgreement(); logger.info("agreement before sending" + agreement); kafkaTemplate.send(getTopicName(action), KEY, agreementRequest); } catch (Exception exception) { logger.info("AgreementService : " + exception.getMessage(), exception); throw exception; } } }
AgreementMessageQueueRepository { public void save(AgreementRequest agreementRequest, String action) { try { Agreement agreement = agreementRequest.getAgreement(); logger.info("agreement before sending" + agreement); kafkaTemplate.send(getTopicName(action), KEY, agreementRequest); } catch (Exception exception) { logger.info("AgreementService : " + exception.getMessage(), exception); throw exception; } } AgreementMessageQueueRepository(LogAwareKafkaTemplate<String, Object> kafkaTemplate,
			@Value("${kafka.topics.start.workflow}") String startWorkflowTopic,
			@Value("${kafka.topics.update.workflow}") String updateWorkflowTopic,
			@Value("${kafka.topics.save.agreement}") String saveTopic,
			@Value("${kafka.topics.update.agreement}") String updateTopic); }
AgreementMessageQueueRepository { public void save(AgreementRequest agreementRequest, String action) { try { Agreement agreement = agreementRequest.getAgreement(); logger.info("agreement before sending" + agreement); kafkaTemplate.send(getTopicName(action), KEY, agreementRequest); } catch (Exception exception) { logger.info("AgreementService : " + exception.getMessage(), exception); throw exception; } } AgreementMessageQueueRepository(LogAwareKafkaTemplate<String, Object> kafkaTemplate,
			@Value("${kafka.topics.start.workflow}") String startWorkflowTopic,
			@Value("${kafka.topics.update.workflow}") String updateWorkflowTopic,
			@Value("${kafka.topics.save.agreement}") String saveTopic,
			@Value("${kafka.topics.update.agreement}") String updateTopic); void save(AgreementRequest agreementRequest, String action); }
AgreementMessageQueueRepository { public void save(AgreementRequest agreementRequest, String action) { try { Agreement agreement = agreementRequest.getAgreement(); logger.info("agreement before sending" + agreement); kafkaTemplate.send(getTopicName(action), KEY, agreementRequest); } catch (Exception exception) { logger.info("AgreementService : " + exception.getMessage(), exception); throw exception; } } AgreementMessageQueueRepository(LogAwareKafkaTemplate<String, Object> kafkaTemplate,
			@Value("${kafka.topics.start.workflow}") String startWorkflowTopic,
			@Value("${kafka.topics.update.workflow}") String updateWorkflowTopic,
			@Value("${kafka.topics.save.agreement}") String saveTopic,
			@Value("${kafka.topics.update.agreement}") String updateTopic); void save(AgreementRequest agreementRequest, String action); static final Logger logger; static final String KEY; static final String START_WORKFLOW; static final String UPDATE_WORKFLOW; static final String SAVE; static final String UPDATE; }