View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule;
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 VoidResultTestCase extends AbstractMuleTestCase
19  {
20  
21      @Test
22      public void testUniqueDeserialization()
23      {
24          VoidResult result = VoidResult.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  }