### Question:
PooledTopicPublisher extends PooledProducer implements TopicPublisher { @Override public void publish(Message message) throws JMSException { getTopicPublisher().publish((Topic) getDestination(), message); } PooledTopicPublisher(TopicPublisher messageProducer, Destination destination); @Override Topic getTopic(); @Override void publish(Message message); @Override void publish(Message message, int i, int i1, long l); @Override void publish(Topic topic, Message message); @Override void publish(Topic topic, Message message, int i, int i1, long l);  }### Answer:
@Test(timeout = 60000) public void testPooledConnectionFactory() throws Exception { ActiveMQTopic topic = new ActiveMQTopic("test"); pcf = new PooledConnectionFactory(); pcf.setConnectionFactory(new ActiveMQConnectionFactory( "vm: connection = (TopicConnection) pcf.createConnection(); TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); TopicPublisher publisher = session.createPublisher(topic); publisher.publish(session.createMessage()); }