@Test public void test_send_message() { final BudgetRequest request = new BudgetRequest(); final Map<String, Object> message = new HashMap<>(); message.put("budgetcontract_create", request); financialProducer.sendMessage(TOPIC_NAME, KEY_NAME, message); verify(kafkaTemplate).send(TOPIC_NAME, KEY_NAME, message); }
public void sendMessage(final String topic, final String key, final Map<String, Object> message) { kafkaTemplate.send(topic, key, message); }
FinancialProducer { public void sendMessage(final String topic, final String key, final Map<String, Object> message) { kafkaTemplate.send(topic, key, message); } }
FinancialProducer { public void sendMessage(final String topic, final String key, final Map<String, Object> message) { kafkaTemplate.send(topic, key, message); } @Autowired  FinancialProducer(final LogAwareKafkaTemplate<String, Object> kafkaTemplate); }
FinancialProducer { public void sendMessage(final String topic, final String key, final Map<String, Object> message) { kafkaTemplate.send(topic, key, message); } @Autowired  FinancialProducer(final LogAwareKafkaTemplate<String, Object> kafkaTemplate); void sendMessage(final String topic, final String key, final Map<String, Object> message); }
FinancialProducer { public void sendMessage(final String topic, final String key, final Map<String, Object> message) { kafkaTemplate.send(topic, key, message); } @Autowired  FinancialProducer(final LogAwareKafkaTemplate<String, Object> kafkaTemplate); void sendMessage(final String topic, final String key, final Map<String, Object> message);  }