JmsTransportUtils { public static int getPriority(URI uri) { return getIntParameter(PRIORITY_PATTERN, uri, Message.DEFAULT_PRIORITY); } private  JmsTransportUtils(); static String headerToJmsProperty(String headerName); static String jmsPropertyToHeader(String propertyName); static URI toUri(Destination destination); static String getDestinationName(URI uri); static void addHeader(Message message, String name, String value); static Iterator<String> getHeaderNames(Message message); static Iterator<String> getHeaders(Message message, String name); static int getDeliveryMode(URI uri); static int getMessageType(URI uri); static long getTimeToLive(URI uri); static int getPriority(URI uri); static String getReplyToName(URI uri);  }
@Test public void getPriority() throws Exception { URI uri = new URI("jms:RequestQueue?priority=5"); int priority = JmsTransportUtils.getPriority(uri); assertEquals("Invalid priority", 5, priority); uri = new URI("jms:RequestQueue?replyToName=RESP_QUEUE"); priority = JmsTransportUtils.getPriority(uri); assertEquals("Invalid priority", Message.DEFAULT_PRIORITY, priority); }