Index: /trunk/autoquest-plugin-http-test/src/test/java/de/ugoe/cs/autoquest/http/eventcore/EqualSOAPDataMapTest.java
===================================================================
--- /trunk/autoquest-plugin-http-test/src/test/java/de/ugoe/cs/autoquest/http/eventcore/EqualSOAPDataMapTest.java	(revision 1986)
+++ /trunk/autoquest-plugin-http-test/src/test/java/de/ugoe/cs/autoquest/http/eventcore/EqualSOAPDataMapTest.java	(revision 1986)
@@ -0,0 +1,86 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.http.eventcore;
+
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.lang.reflect.Field;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.collections4.set.ListOrderedSet;
+import org.junit.Test;
+
+import de.ugoe.cs.autoquest.eventcore.Event;
+import de.ugoe.cs.autoquest.plugin.http.HTTPLogParser;
+import de.ugoe.cs.autoquest.plugin.http.SOAPUtils;
+import de.ugoe.cs.autoquest.plugin.http.eventcore.EqualSOAPDataMap;
+import de.ugoe.cs.autoquest.plugin.http.eventcore.SimpleSOAPEventType;
+
+/**
+ * @author Steffen Herbold
+ */
+public class EqualSOAPDataMapTest {
+
+    /**
+     * 
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testSerialization_1() throws Exception {
+        HTTPLogParser parser =
+            new HTTPLogParser(new File(ClassLoader
+                .getSystemResource("testParseFile_3_properties.txt").getFile()));
+        parser.parseFile(new File(ClassLoader.getSystemResource("testParseFile_3_logfile.log")
+            .getFile()));
+        for( List<Event> sequence : parser.getSequences() ) {
+            SOAPUtils.convertToSimpleSOAPEvent(sequence, true);
+        }
+        
+        Field privateStringField = EqualSOAPDataMap.class.
+                    getDeclaredField("soapRequestBodies");
+
+        privateStringField.setAccessible(true);
+
+        Map<SimpleSOAPEventType, ListOrderedSet<String>> internalMapExpected = (Map<SimpleSOAPEventType, ListOrderedSet<String>>) privateStringField.get(EqualSOAPDataMap.getInstance());
+        
+        // serialize
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        ObjectOutputStream oos = new ObjectOutputStream(out);
+        oos.writeObject(EqualSOAPDataMap.getInstance());
+        oos.close();
+
+        EqualSOAPDataMap.getInstance().reset();
+        
+        // deserialize
+        byte[] pickled = out.toByteArray();
+        InputStream in = new ByteArrayInputStream(pickled);
+        ObjectInputStream ois = new ObjectInputStream(in);
+        ois.readObject();
+        ois.close();
+        
+        Map<SimpleSOAPEventType, ListOrderedSet<String>> internalMapResult = (Map<SimpleSOAPEventType, ListOrderedSet<String>>) privateStringField.get(EqualSOAPDataMap.getInstance());
+        
+        assertNotSame(internalMapExpected, internalMapResult);
+        assertEquals(internalMapExpected, internalMapResult);
+    }
+
+}
Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/EqualSOAPDataMap.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/EqualSOAPDataMap.java	(revision 1985)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/EqualSOAPDataMap.java	(revision 1986)
@@ -15,4 +15,8 @@
 package de.ugoe.cs.autoquest.plugin.http.eventcore;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
 import java.util.Collections;
 import java.util.HashMap;
@@ -30,23 +34,87 @@
  * @author Steffen Herbold
  */
-public class EqualSOAPDataMap {
+public class EqualSOAPDataMap implements Serializable {
     
+    /**  */
+    private static final long serialVersionUID = 1L;
+
     /**
      * Singleton. Handle to only instance of this class
      */
-    public final static EqualSOAPDataMap INSTANCE = new EqualSOAPDataMap();
+    transient private static EqualSOAPDataMap INSTANCE = new EqualSOAPDataMap();
     
     /**
      * Map with all soapRequestBodies for all equal {@link SimpleSOAPEventType}s
      */
-    private final Map<SimpleSOAPEventType, ListOrderedSet<String>> soapRequestBodies = new HashMap<>();
+    private Map<SimpleSOAPEventType, ListOrderedSet<String>> soapRequestBodies = new HashMap<>();
     
     /**
      * random number generator for picking a random request body
      */
-    private final Random random = new Random(1); // TODO static seed for testing
+    transient private final Random random;
+    
+    /**
+     * <p>
+     * return the instance of the class
+     * </p>
+     *
+     * @return
+     */
+    public static EqualSOAPDataMap getInstance() {
+        return INSTANCE;
+    }
     
     private EqualSOAPDataMap() {
         // private constructor to avoid initialization
+        random = new Random();
+    }
+    
+    /**
+     * <p>
+     * Manual serialization of the object. Necessary to guarantee the singleton
+     * property.
+     * </p>
+     * 
+     * @param s
+     *            output stream for the serialization
+     * @throws IOException
+     *             thrown if there is problem writing to the output stream
+     */
+    private void writeObject(ObjectOutputStream s) throws IOException {
+            s.defaultWriteObject();
+            s.writeObject(soapRequestBodies);
+    }
+
+    /**
+     * <p>
+     * Manual de-serialization of the object. Necessary to guarantee the
+     * singleton property.
+     * 
+     * @param s
+     *            input stream for the de-serialization
+     * @throws IOException
+     *             thrown if there is problem reading from the input stream
+     * @throws ClassNotFoundException
+     *             thrown if there is a problem reading from the input stream
+     */
+    @SuppressWarnings("unchecked")
+    private void readObject(ObjectInputStream s) throws IOException,
+                    ClassNotFoundException {
+            s.defaultReadObject();
+            if (INSTANCE == null) {
+                INSTANCE = new EqualSOAPDataMap();
+            }
+            INSTANCE.soapRequestBodies = (Map<SimpleSOAPEventType, ListOrderedSet<String>>) s.readObject();
+    }
+
+    /**
+     * <p>
+     * Manual de-serialization to guarantee the singleton property.
+     * </p>
+     * 
+     * @return instance of the container
+     */
+    private Object readResolve() {
+            return INSTANCE;
     }
 
@@ -97,3 +165,13 @@
         return requestBodySet.get(random.nextInt(requestBodySet.size()));
     }
+    
+    /**
+     * <p>
+     * resets the internal map by creating new one
+     * </p>
+     *
+     */
+    public void reset() {
+        soapRequestBodies = new HashMap<>();
+    }
 }
Index: /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SimpleSOAPEventType.java
===================================================================
--- /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SimpleSOAPEventType.java	(revision 1985)
+++ /trunk/autoquest-plugin-http/src/main/java/de/ugoe/cs/autoquest/plugin/http/eventcore/SimpleSOAPEventType.java	(revision 1986)
@@ -99,5 +99,5 @@
         this.clientName = clientName;
         this.soapRequestBody = SOAPUtils.getSerialization(soapRequestBody);
-        EqualSOAPDataMap.INSTANCE.add(this, this.soapRequestBody);
+        EqualSOAPDataMap.getInstance().add(this, this.soapRequestBody);
     }
 
@@ -150,5 +150,5 @@
                 break;
             case RANDOM:
-                requestBody = EqualSOAPDataMap.INSTANCE.getRandom(this);
+                requestBody = EqualSOAPDataMap.getInstance().getRandom(this);
                 break;
             default:
@@ -157,5 +157,5 @@
         if( requestBody==null ) {
             System.err.println("foobar" + this);
-            System.err.println(EqualSOAPDataMap.INSTANCE.getAll(this));
+            System.err.println(EqualSOAPDataMap.getInstance().getAll(this));
         }
         try {
