### Question:
Demo02Producer { public void syncSend(Integer id, String routingKey) { Demo02Message message = new Demo02Message(); message.setId(id); rabbitTemplate.convertAndSend(Demo02Message.EXCHANGE, routingKey, message); }  void syncSend(Integer id, String routingKey);  }### Answer:
@Test public void testSyncSendSuccess() throws InterruptedException { int id = (int) (System.currentTimeMillis() / 1000); producer.syncSend(id, "da.yu.nai"); logger.info("[testSyncSend][发送编号：[{}] 发送成功]", id); new CountDownLatch(1).await(); }
@Test public void testSyncSendFailure() throws InterruptedException { int id = (int) (System.currentTimeMillis() / 1000); producer.syncSend(id, "yu.nai.shuai"); logger.info("[testSyncSend][发送编号：[{}] 发送成功]", id); new CountDownLatch(1).await(); }