@@ -0,0 +1,2113 @@
+package guitests;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport org.junit.Test;%0A%0Aimport seedu.jimi.TestApp;%0Aimport seedu.jimi.commons.core.Config;%0Aimport seedu.jimi.commons.exceptions.DataConversionException;%0Aimport seedu.jimi.commons.util.ConfigUtil;%0Aimport seedu.jimi.logic.commands.SaveAsCommand;%0Aimport seedu.jimi.testutil.TestUtil;%0A%0Apublic class SaveAsCommandTest extends AddressBookGuiTest%7B%0A%0A    @Test%0A    public void saveAs() throws DataConversionException %7B%0A        Config currentConfig = ConfigUtil.readConfig(TestApp.DEFAULT_CONFIG_FILE_FOR_TESTING).orElse(new Config());%0A        SaveAsCommand.setConfigFilePath(TestApp.DEFAULT_CONFIG_FILE_FOR_TESTING);%0A        String originalTaskBookFilePath = TestUtil.getFilePathInSandboxFolder(%22sampleData.xml%22);%0A        %0A        // Taskbook directory to be changed to%0A        String newTaskBookFilePath = TestUtil.getFilePathInSandboxFolder(%22newSampleData.xml%22);%0A        %0A        // change storage directory%0A        commandBox.runCommand(getSaveAsCommand(newTaskBookFilePath));%0A        %0A        // save to duplicate storage directory%0A        commandBox.runCommand(getSaveAsCommand(newTaskBookFilePath));%0A        assertResultMessage(SaveAsCommand.MESSAGE_DUPLICATE_SAVE_DIRECTORY);%0A%0A        // reset storage directory for next test run%0A        assertSaveAsSuccess(currentConfig, originalTaskBookFilePath);%0A    %7D%0A%0A    /**%0A     * Runs the saveAs command on the newTaskBookFilePath and checks if the edited filepath matches with new filepath on the config file.%0A     * %0A     * @param newFilePath newFilePath name to be used%0A     * @param currentConfig Config file to be edited.%0A     *%0A     */%0A    private void assertSaveAsSuccess(Config currentConfig, String newFilePath) %7B%0A        commandBox.runCommand(getSaveAsCommand(newFilePath));%0A        %0A        Config expectedConfig = new Config();%0A        expectedConfig.setTaskBookFilePath(newFilePath);%0A        %0A    %7D%0A    %0A    public String getSaveAsCommand(String newFilePath) %7B%0A        StringBuilder sb = new StringBuilder();%0A        sb.append(%22saveas %22 + newFilePath + %22 %22);%0A        return sb.toString();%0A    %7D%0A%7D%0A

Add Junit Test for SaveAsCommand