### Question:
JmsQueueConnection extends JmsConnection implements AutoCloseable { @Override public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException { throw new javax.jms.IllegalStateException("Operation not supported by a QueueConnection"); } JmsQueueConnection(JmsConnectionInfo connectionInfo, Provider provider); @Override TopicSession createTopicSession(boolean transacted, int acknowledgeMode); @Override ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages); @Override ConnectionConsumer createConnectionConsumer(Topic topic, String messageSelector, ServerSessionPool sessionPool, int maxMessages);  }### Answer:
@Test(timeout = 30000, expected=IllegalStateException.class) public void testCreateDurableConnectionConsumerOnQueueConnection() throws JMSException { queueConnection.createDurableConnectionConsumer(new JmsTopic(), "subscriptionName", "", (ServerSessionPool)null, 1); }