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