// Path: core/src/main/java/au/com/sensis/stubby/utils/DeepCopyUtils.java
// public class DeepCopyUtils {
//     
//     @SuppressWarnings("unchecked")
//     public static <T> T deepCopy(T src) {
//         try {
//             ByteArrayOutputStream outStream = new ByteArrayOutputStream();
//             new ObjectOutputStream(outStream).writeObject(src);
//             ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
//             return (T)new ObjectInputStream(inStream).readObject();
//         } catch (Exception e) {
//             throw new RuntimeException("Error performing deep copy", e);
//         }
//     }
//     
// }


import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.codehaus.jackson.annotate.JsonIgnore;
import au.com.sensis.stubby.utils.DeepCopyUtils;
package au.com.sensis.stubby.model;




public abstract class StubMessage {

    private List<StubParam> headers;
    private Object body;

    protected StubMessage() { }
    
    protected StubMessage(StubMessage other) { // copy constructor
// Path: core/src/main/java/au/com/sensis/stubby/utils/DeepCopyUtils.java
// public class DeepCopyUtils {
//     
//     @SuppressWarnings("unchecked")
//     public static <T> T deepCopy(T src) {
//         try {
//             ByteArrayOutputStream outStream = new ByteArrayOutputStream();
//             new ObjectOutputStream(outStream).writeObject(src);
//             ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
//             return (T)new ObjectInputStream(inStream).readObject();
//         } catch (Exception e) {
//             throw new RuntimeException("Error performing deep copy", e);
//         }
//     }
//     
// }


// Path: core/src/main/java/au/com/sensis/stubby/model/StubMessage.java
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.codehaus.jackson.annotate.JsonIgnore;
import au.com.sensis.stubby.utils.DeepCopyUtils;

package au.com.sensis.stubby.model;




public abstract class StubMessage {

    private List<StubParam> headers;
    private Object body;

    protected StubMessage() { }
    
    protected StubMessage(StubMessage other) { // copy constructor
        this.body = (other.body != null) ? DeepCopyUtils.deepCopy(other.body) : null;