package org.jeeventstore.serialization;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.jeeventstore.EventSerializer;
import org.jeeventstore.serialization.JavaSerializer;
import org.testng.Assert;
import org.testng.annotations.Test;

/**
 *
 * @author Alexander Langer
 */
public class JavaSerializerTest {

    private final static String RESULT 
            = "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D"
            + "99C7619D03000149000473697A6578700000000277040000000274000C4865"
            + "6C6C6F2C20576F726C647372000E6A6176612E6C616E672E4C6F6E673B8BE4"
            + "90CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E"
            + "756D62657286AC951D0B94E08B0200007870000000000000303978";

    private List<Serializable> data() {
        List<Serializable> list = new ArrayList<>();
        list.add("Hello, World");
        list.add(12345L);
        return list;
    }

    @Test
    public void test_serialize() throws Exception {
        EventSerializer ms = new JavaSerializer();
        List<? extends Serializable> list = data();
        String res = ms.serialize(list);
        Assert.assertEquals(res, RESULT);
    }

    @Test
    public void test_deserialize() throws Exception {
        EventSerializer ms = new JavaSerializer();
        List<? extends Serializable> list = data();
        List reconstructed = ms.deserialize(RESULT);
        Assert.assertEquals(reconstructed, list);
    }
    
}

@@ -350,437 +350,8 @@
  %7B%0A%0A
-    private final static String RESULT %0A            = %22ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D%22%0A            + %2299C7619D03000149000473697A6578700000000277040000000274000C4865%22%0A            + %226C6C6F2C20576F726C647372000E6A6176612E6C616E672E4C6F6E673B8BE4%22%0A            + %2290CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E%22%0A            + %22756D62657286AC951D0B94E08B0200007870000000000000303978%22;%0A%0A
     
@@ -605,32 +605,33 @@
 EventSerializer 
+s
 ms = new JavaSer
@@ -714,16 +714,17 @@
 g res = 
+s
 ms.seria
@@ -739,120 +739,8 @@
 t);%0A
-        Assert.assertEquals(res, RESULT);%0A    %7D%0A%0A    @Test%0A    public void test_deserialize() throws Exception %7B
 %0A   
@@ -760,16 +760,17 @@
 ializer 
+d
 ms = new
@@ -792,60 +792,8 @@
 ();%0A
-        List%3C? extends Serializable%3E list = data();%0A
     
@@ -817,16 +817,17 @@
 ucted = 
+d
 ms.deser
@@ -837,14 +837,11 @@
 ize(
-RESULT
+res
 );%0A 

Change JavaSerializerTest, since String output differs on different platforms