@@ -0,0 +1,2630 @@
+/*%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 */%0A%0Apackage org.apache.jmeter.resources;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.util.Enumeration;%0Aimport java.util.Properties;%0A%0Aimport org.apache.jmeter.junit.JMeterTestCaseJUnit3;%0Aimport org.apache.jmeter.util.JMeterUtils;%0A%0Apublic class TestPropertiesFiles extends JMeterTestCaseJUnit3 %7B%0A    %0A%0A    public void testUserProperties() throws Exception %7B%0A        Properties props = loadProps(new File(JMeterUtils.getJMeterBinDir(), %22user.properties%22));%0A        assertTrue(%22user.properties should not contain any enabled properties%22, props.isEmpty());%0A    %7D%0A%0A    // The keys in jmeter.properties and reportgenerator.properties should be distinct%0A    public void testDefaultProperties() throws Exception %7B%0A        Properties jmeter = loadProps(new File(JMeterUtils.getJMeterBinDir(), %22jmeter.properties%22));%0A        Properties report = loadProps(new File(JMeterUtils.getJMeterBinDir(), %22reportgenerator.properties%22));%0A        %7B%0A            Enumeration%3C?%3E names = jmeter.propertyNames();%0A            while(names.hasMoreElements()) %7B%0A                final Object key = names.nextElement();%0A                assertFalse(%22reportgenerator should not contain the jmeter key %22 + key, report.containsKey(key));%0A            %7D%0A        %7D%0A        %7B%0A            Enumeration%3C?%3E names = report.propertyNames();%0A            while(names.hasMoreElements()) %7B%0A                final Object key = names.nextElement();%0A                assertFalse(%22jmeter should not contain the reportgenerator key %22 + key, jmeter.containsKey(key));%0A            %7D%0A        %7D%0A    %7D%0A%0A    private static Properties loadProps(File file) throws Exception%7B%0A        Properties props = new Properties();%0A        try (FileInputStream inStream = new FileInputStream(file))%7B%0A            props.load(inStream);            %0A        %7D%0A        return props;%0A    %7D%0A%7D%0A

Add tests for properties files