/**
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.activemq.config;

import junit.framework.TestCase;
import org.apache.activemq.broker.BrokerFactory;
import org.apache.activemq.broker.BrokerService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @version $Revision$
 */
public class BrokerPropertiesTest extends TestCase {
    private static final transient Log LOG = LogFactory.getLog(BrokerPropertiesTest.class);
    
    public void testPropertiesFile() throws Exception {
        BrokerService broker = BrokerFactory.createBroker("properties:org/apache/activemq/config/broker.properties");

        LOG.info("Created broker: " + broker);
        assertNotNull(broker);

        assertEquals("isUseJmx()", false, broker.isUseJmx());
        assertEquals("isPersistent()", false, broker.isPersistent());
        assertEquals("getBrokerName()", "Cheese", broker.getBrokerName());
    }
}

@@ -834,16 +834,45 @@
 onfig;%0A%0A
+import javax.jms.Connection;%0A
 import j
@@ -927,26 +927,130 @@
 emq.
-broker.BrokerFacto
+ActiveMQConnectionFactory;%0Aimport org.apache.activemq.broker.BrokerFactory;%0Aimport org.apache.activemq.broker.BrokerRegist
 ry;%0A
@@ -1822,20 +1822,751 @@
 kerName());%0A
+        broker.stop();%0A    %7D%0A%0A%0A    public void testVmBrokerPropertiesFile() throws Exception %7B%0A        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(%22vm://localhost?brokerConfig=properties:org/apache/activemq/config/broker.properties%22);%0A        Connection connection = factory.createConnection();%0A        BrokerService broker = BrokerRegistry.getInstance().lookup(%22Cheese%22);%0A        LOG.info(%22Found broker : %22 + broker);%0A        assertNotNull(broker);%0A%0A        assertEquals(%22isUseJmx()%22, false, broker.isUseJmx());%0A        assertEquals(%22isPersistent()%22, false, broker.isPersistent());%0A        assertEquals(%22getBrokerName()%22, %22Cheese%22, broker.getBrokerName());%0A        connection.close();%0A        broker.stop();%0A
     %7D%0A%7D%0A

add simple vm properties test