Initial framework migration to netty.
[bgpcep.git] / framework / src / test / java / org / opendaylight / protocol / framework / ComplementaryTest.java
index 2d6cad8c5f6cbae8843c0a93f5118edae0b8b170..82cc18c6b18693cab6b0ec8d0cacef00264de6e9 100644 (file)
@@ -7,36 +7,12 @@
  */
 package org.opendaylight.protocol.framework;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 
 public class ComplementaryTest {
 
-       private class ProtocolMessageImpl implements ProtocolMessage {
-
-               private static final long serialVersionUID = 1L;
-       }
-
-       private class ProtocolMessageFactoryImpl implements ProtocolMessageFactory {
-
-               public ProtocolMessageFactoryImpl() {
-
-               }
-
-               @Override
-               public ProtocolMessage parse(final byte[] bytes,
-                               final ProtocolMessageHeader msgHeader) throws DeserializerException,
-                               DocumentedException {
-                       return null;
-               }
-
-               @Override
-               public byte[] put(final ProtocolMessage msg) {
-                       return new byte[]{ 12, 13 };
-               }
-       }
-
        @Test
        public void testExceptions() {
                final DeserializerException de = new DeserializerException("some error");
@@ -44,30 +20,4 @@ public class ComplementaryTest {
 
                assertEquals(de.getMessage(), ee.getMessage());
        }
-
-       @Test
-       public void testProtocolOutputStream() {
-               final ProtocolOutputStream pos = new ProtocolOutputStream();
-               pos.putMessage(new ProtocolMessageImpl(), new ProtocolMessageFactoryImpl());
-               try {
-                       pos.putMessage(new ProtocolMessageImpl(), new ProtocolMessageFactory() {
-
-                               @Override
-                               public byte[] put(final ProtocolMessage msg) {
-                                       return null;
-                               }
-
-                               @Override
-                               public ProtocolMessage parse(final byte[] bytes, final ProtocolMessageHeader msgHeader)
-                                               throws DeserializerException, DocumentedException {
-                                       return null;
-                               }
-                       });
-                       fail("Exception should have occured.");
-               } catch (final IllegalArgumentException e) {
-                       assertEquals("Message parsed to null.", e.getMessage());
-                       assertEquals(1, pos.getBuffers().size());
-                       assertArrayEquals(new byte[] { 12, 13}, pos.getBuffers().peek().array());
-               }
-       }
 }