### Question:
JmsDefaultPrefetchPolicy implements JmsPrefetchPolicy { public void setAll(int prefetch) { this.durableTopicPrefetch = getMaxPrefetchLimit(prefetch); this.queueBrowserPrefetch = getMaxPrefetchLimit(prefetch); this.queuePrefetch = getMaxPrefetchLimit(prefetch); this.topicPrefetch = getMaxPrefetchLimit(prefetch); } JmsDefaultPrefetchPolicy();  JmsDefaultPrefetchPolicy(JmsDefaultPrefetchPolicy source); @Override JmsDefaultPrefetchPolicy copy(); @Override int getConfiguredPrefetch(JmsSession session, JmsDestination destination, boolean durable, boolean browser); int getDurableTopicPrefetch(); void setDurableTopicPrefetch(int durableTopicPrefetch); int getQueuePrefetch(); void setQueuePrefetch(int queuePrefetch); int getQueueBrowserPrefetch(); void setQueueBrowserPrefetch(int queueBrowserPrefetch); int getTopicPrefetch(); void setTopicPrefetch(int topicPrefetch); int getMaxPrefetchSize(); void setMaxPrefetchSize(int maxPrefetchSize); void setAll(int prefetch); @Override int hashCode(); @Override boolean equals(Object obj); static final int MAX_PREFETCH_SIZE; static final int DEFAULT_QUEUE_PREFETCH; static final int DEFAULT_QUEUE_BROWSER_PREFETCH; static final int DEFAULT_DURABLE_TOPIC_PREFETCH; static final int DEFAULT_TOPIC_PREFETCH; }### Answer:
@Test public void testSetAll() { JmsDefaultPrefetchPolicy policy = new JmsDefaultPrefetchPolicy(); assertEquals(JmsDefaultPrefetchPolicy.DEFAULT_TOPIC_PREFETCH, policy.getTopicPrefetch()); assertEquals(JmsDefaultPrefetchPolicy.DEFAULT_DURABLE_TOPIC_PREFETCH, policy.getDurableTopicPrefetch()); assertEquals(JmsDefaultPrefetchPolicy.DEFAULT_QUEUE_PREFETCH, policy.getQueuePrefetch()); assertEquals(JmsDefaultPrefetchPolicy.DEFAULT_QUEUE_BROWSER_PREFETCH, policy.getQueueBrowserPrefetch()); policy.setAll(42); assertEquals(42, policy.getTopicPrefetch()); assertEquals(42, policy.getDurableTopicPrefetch()); assertEquals(42, policy.getQueuePrefetch()); assertEquals(42, policy.getQueueBrowserPrefetch()); }