@@ -0,0 +1,3066 @@
+/**%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.apache.activemq.transport.http;%0A%0Aimport java.net.URISyntaxException;%0A%0Aimport javax.jms.ConnectionFactory;%0Aimport javax.jms.MapMessage;%0Aimport javax.jms.MessageConsumer;%0Aimport javax.jms.MessageProducer;%0Aimport javax.jms.Session;%0A%0Aimport junit.framework.Test;%0A%0Aimport org.apache.activemq.ActiveMQConnectionFactory;%0Aimport org.apache.activemq.JMSMessageTest;%0Aimport org.apache.activemq.broker.BrokerService;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0A%0Apublic class HttpJMSMessageTest extends JMSMessageTest %7B%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A    %7D%0A%0A    @After%0A    public void tearDown() throws Exception %7B%0A        super.tearDown();%0A    %7D%0A%0A    public static Test suite() %7B%0A        return suite(HttpJMSMessageTest.class);%0A    %7D%0A%0A    @Override%0A    protected ConnectionFactory createConnectionFactory() throws URISyntaxException %7B%0A        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(getBrokerURL());%0A        return factory;%0A    %7D%0A%0A    protected String getBrokerURL() %7B%0A        return %22http://localhost:8161%22;%0A    %7D%0A%0A    @Override%0A    protected BrokerService createBroker() throws Exception %7B%0A        BrokerService answer = new BrokerService();%0A        answer.setPersistent(false);%0A        answer.setUseJmx(false);%0A        answer.setManagementContext(null);%0A        answer.addConnector(getBrokerURL());%0A        return answer;%0A    %7D%0A%0A    public void testEmptyMapMessage() throws Exception %7B%0A%0A        // Receive a message with the JMS API%0A        connection.start();%0A        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);%0A        destination = createDestination(session, destinationType);%0A        MessageConsumer consumer = session.createConsumer(destination);%0A        MessageProducer producer = session.createProducer(destination);%0A%0A        // send the message.%0A        %7B%0A            MapMessage message = session.createMapMessage();%0A            producer.send(message);%0A        %7D%0A%0A        // get the message.%0A        %7B%0A            MapMessage message = (MapMessage)consumer.receive(1000);%0A            assertNotNull(message);%0A            assertFalse(message.getMapNames().hasMoreElements());%0A        %7D%0A        assertNull(consumer.receiveNoWait());%0A    %7D%0A%7D%0A

Test case for: https://issues.apache.org/jira/browse/AMQ-3202