@@ -0,0 +1,2084 @@
+/*%0A * ARX: Powerful Data Anonymization%0A * Copyright 2012 - 2016 Fabian Prasser, Florian Kohlmayer and contributors%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * 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.deidentifier.arx.test;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.util.Properties;%0A%0Aimport org.deidentifier.arx.gui.resources.Resources;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A/**%0A * A simple test which checks for duplicate message in the resource bundle%0A * @author Fabian Prasser%0A */%0Apublic class TestResourceBundle %7B%0A%0A    /**%0A     * Helper class which wraps Properties%0A     * @author Fabian Prasser%0A     */%0A    private static class WrappedProperties extends Properties %7B%0A%0A        /** SVUID*/%0A        private static final long serialVersionUID = 7390022720344169366L;%0A%0A        @Override%0A        public synchronized Object put(Object key, Object value) %7B%0A            if (get(key) != null) %7B%0A                throw new IllegalStateException(%22Duplicate key: %22 + key + %22 - Current value: %22 + value + %22 - Original value: %22 + (String) get(key));%0A            %7D%0A            return super.put(key, value);%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void test() throws IOException %7B%0A        try %7B%0A            WrappedProperties resources = new WrappedProperties();%0A            InputStream stream = Resources.class.getClassLoader().getResourceAsStream(%22org/deidentifier/arx/gui/resources/messages.properties%22);%0A            resources.load(stream);%0A            stream.close();%0A        %7D catch (IllegalStateException e) %7B%0A            Assert.fail(e.getMessage());%0A        %7D%0A    %7D%0A%7D

Add test which checks for duplicate entries in messages.properties