Add encoding size asserts
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / test / java / org / opendaylight / controller / cluster / schema / provider / impl / YangTextSourceSerializationProxyTest.java
index b2a86e1c0ceef3b1c19f06bc320b7c1911b9c785..084fd5242f2276818a92c7b82080cfb38fc4a120 100644 (file)
@@ -38,14 +38,17 @@ public class YangTextSourceSerializationProxyTest {
 
 
     @Test
-    public void serializeAndDesrializeProxy() throws ClassNotFoundException, IOException {
+    public void serializeAndDeserializeProxy() throws ClassNotFoundException, IOException {
         YangTextSchemaSourceSerializationProxy proxy = new YangTextSchemaSourceSerializationProxy(schemaSource);
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         ObjectOutputStream oos = new ObjectOutputStream(bos);
 
         oos.writeObject(proxy);
 
-        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
+        final byte[] bytes = bos.toByteArray();
+        assertEquals(353, bytes.length);
+
+        ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
 
         YangTextSchemaSourceSerializationProxy deserializedProxy =
                 (YangTextSchemaSourceSerializationProxy) ois.readObject();