### Question:
Demo04Producer { public void syncSend(Integer id) { Demo04Message message = new Demo04Message(); message.setId(id); jmsTemplate.convertAndSend(this.getQueue(id), message); }  void syncSend(Integer id);  }### Answer:
@Test public void testSyncSend() throws InterruptedException { for (int i = 0; i < 2; i++) { for (int id = 0; id < 4; id++) { producer.syncSend(id); } } new CountDownLatch(1).await(); }