@@ -0,0 +1,3092 @@
+/*%0A * DownloadClient Geodateninfrastruktur Bayern%0A *%0A * (c) 2016 GSt. GDI-BY (gdi.bayern.de)%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 */%0Apackage de.bayern.gdi.utils;%0A%0Aimport junit.framework.TestCase;%0Aimport org.junit.Test;%0Aimport org.xml.sax.SAXException;%0A%0Aimport javax.xml.parsers.ParserConfigurationException;%0Aimport java.io.File;%0Aimport java.io.FileWriter;%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0A%0A/**%0A * Test for DownloadConfig.%0A */%0Apublic class DownloadConfigTest extends TestCase %7B%0A%0A%0A    /** Test the getters of the DownloadConfig class based on Biergarten.%0A     * @throws ParserConfigurationException Exception just in case%0A     * @throws SAXException Exception just in case%0A     * @throws DownloadConfig.NoServiceURLException Exception just in case%0A     * @throws IOException Exception just in case%0A     */%0A    @Test%0A    public void testDownloadConfigGetters() throws ParserConfigurationException%0A        , SAXException, DownloadConfig.NoServiceURLException, IOException %7B%0A%0A%0A        DownloadConfiguration dc = new DownloadConfiguration();%0A        String dirname = %22gdiBY%22;%0A        Path tempPath = Files.createTempDirectory(dirname);%0A        File file = new File(tempPath + File.separator + %22test.xml%22);%0A        FileWriter fileWriter = new FileWriter(file);%0A        fileWriter.write(dc.getBiergartenConfiguration(tempPath.toString()));%0A        fileWriter.flush();%0A        fileWriter.close();%0A        DownloadConfig downloadConfig = new DownloadConfig(file);%0A%0A        assertEquals(%0A            %22http://www.geodaten.bayern.de/ba-data/Themen/kml/biergarten.kml%22%0A            , downloadConfig.getAtomVariation());%0A%0A        assertEquals(%222496b2ed-8a64-465a-95dd-170799788982%22%0A            , downloadConfig.getDataset());%0A%0A        assertEquals(tempPath.toString(), downloadConfig.getDownloadPath());%0A%0A        assertEquals(file, downloadConfig.getFile());%0A%0A        assertEquals(%22application/vnd.google-earth.kml+xml%22%0A            , downloadConfig.getOutputFormat());%0A%0A//        assertEquals(%22%7BVARIATION=%22%0A//                + downloadConfig.getAtomVariation().toString()%0A//                + %22, outputformat=%22%0A//                + downloadConfig.getOutputFormat().toString() + %22%7D%22%0A//            , downloadConfig.getParams());%0A%0A        assertNull(downloadConfig.getProcessingSteps());%0A%0A        assertEquals(%22ATOM%22, downloadConfig.getServiceType());%0A%0A        assertEquals(%22https://geoportal.bayern.de/gdiadmin/ausgabe/%22%0A            + %22ATOM_SERVICE/a90c75a0-f1b5-46e7-9e45-c0385fd0c200%22%0A        , downloadConfig.getServiceURL());%0A%0A    %7D%0A%7D%0A

Add Unit Tests for the DownloadConfig class