public void testSerializeAndDeserialize() throws Exception {
ScriptMonkeySettings settings = new ScriptMonkeySettings();
settings.setHomeFolder(tmpFolder.getAbsolutePath());
PluginScript script1 = new PluginScript(true, "File 1", PluginScript.RUN_MODE.INTELLIJ_STARTUP);
PluginScript script2 = new PluginScript(false, "File 2", PluginScript.RUN_MODE.PROJECT_OPEN);
PluginScript script3 = new PluginScript(false, "File 3", PluginScript.RUN_MODE.PROJECT_CLOSE);
PluginScript script4 = new PluginScript(false, "File 4", PluginScript.RUN_MODE.INTELLIJ_SHUTDOWN);
List<PluginScript> pluginScripts = Arrays.asList(script1, script2, script3, script4);
settings.setPluginScripts(pluginScripts);
File tempXML = new File(tmpFolder, "test.xml");