@@ -0,0 +1,1700 @@
+package linenux.config;%0A%0Aimport linenux.util.ArrayListUtil;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.io.File;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.util.Collection;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0A//@@author A0135788M%0Apublic class JsonConfigTest %7B%0A    private Path tempDir;%0A    private Path jsonPath;%0A    private Path xmlPath;%0A    private Config config;%0A%0A    @Before%0A    public void setupTestEnvironment() throws Exception %7B%0A        this.tempDir = Files.createTempDirectory(%22tmp%22);%0A        this.jsonPath = this.tempDir.resolve(%22config.json%22);%0A        this.xmlPath = this.tempDir.resolve(%22schedule.xml%22);%0A        this.reinitializeConfig();%0A    %7D%0A%0A    private void reinitializeConfig() %7B%0A        this.config = new JsonConfig(%22test%22, this.jsonPath.toString(), this.xmlPath.toString());%0A    %7D%0A%0A    @After%0A    public void teardown() %7B%0A        new File(this.jsonPath.toString()).delete();%0A        new File(this.tempDir.toString()).delete();%0A    %7D%0A%0A    @Test%0A    public void saveAndLoadScheduleFilePath() %7B%0A        this.config.setScheduleFilePath(%22hello.xml%22);%0A        this.reinitializeConfig();%0A        assertEquals(%22hello.xml%22, this.config.getScheduleFilePath());%0A    %7D%0A%0A    @Test%0A    public void saveAndLoadAliases() %7B%0A        this.config.setAliases(%22hello%22, ArrayListUtil.fromArray(new String%5B%5D %7B%22hello%22, %22foo%22, %22bar%22%7D));%0A        this.reinitializeConfig();%0A        Collection%3CString%3E aliases = this.config.getAliases(%22hello%22);%0A        assertTrue(aliases.contains(%22hello%22));%0A        assertTrue(aliases.contains(%22foo%22));%0A        assertTrue(aliases.contains(%22bar%22));%0A    %7D%0A%7D%0A

Write tests for JsonConfig