commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1023454 - /commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java
Date Sun, 17 Oct 2010 11:02:15 GMT
Author: sebb
Date: Sun Oct 17 11:02:15 2010
New Revision: 1023454

URL: http://svn.apache.org/viewvc?rev=1023454&view=rev
Log:
Add (disabled) test for Collections-363

Modified:
    commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java?rev=1023454&r1=1023453&r2=1023454&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/splitmap/TestTransformedMap.java
Sun Oct 17 11:02:15 2010
@@ -16,6 +16,10 @@
  */
 package org.apache.commons.collections.splitmap;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 import java.math.BigInteger;
 import java.util.HashMap;
 
@@ -130,4 +134,20 @@ public class TestTransformedMap extends 
         }
     }
 
+    public void TODOtestCollections363() throws Exception {
+        TransformedMap<String, String, String, String> map = TransformedMap.decorate(
+                new HashMap<String, String>(), 
+                NOPTransformer.<String> getInstance(), 
+                NOPTransformer.<String> getInstance());
+        
+        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+        ObjectOutputStream out = new ObjectOutputStream(bytes);
+        out.writeObject(map);
+        out.close();
+        ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
+        Object readObject = in.readObject();
+        in.close();
+        assertEquals("deserializing class: " + map.getClass().getName(), map.getClass(),
readObject
+                .getClass());
+    }
 }



Mime
View raw message