1
2
3
4
5
6
7 package org.mule.transport;
8
9 import org.mule.tck.junit4.AbstractMuleTestCase;
10
11 import org.apache.commons.lang.SerializationUtils;
12 import org.junit.Test;
13
14 import static org.junit.Assert.assertEquals;
15 import static org.junit.Assert.assertNotNull;
16 import static org.junit.Assert.assertSame;
17
18 public class NullPayloadTestCase extends AbstractMuleTestCase
19 {
20
21 @Test
22 public void testUniqueDeserialization()
23 {
24 NullPayload result = NullPayload.getInstance();
25
26 byte[] serialized = SerializationUtils.serialize(result);
27 assertNotNull(serialized);
28
29 Object deserialized = SerializationUtils.deserialize(serialized);
30 assertSame(deserialized, result);
31 assertEquals(deserialized, result);
32 }
33
34 }