Merge "Added more (de)serialization factories + ByteBufUtils methods"
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / HelloMessageFactoryTest.java
1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */\r
2 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;\r
3 \r
4 import io.netty.buffer.ByteBuf;\r
5 \r
6 import org.junit.Test;\r
7 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;\r
8 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloMessage;\r
9 \r
10 /**\r
11  * @author michal.polkorab\r
12  * \r
13  */\r
14 public class HelloMessageFactoryTest {\r
15 \r
16     /** Number of currently supported version / codec */\r
17     public static final Short VERSION_YET_SUPPORTED = 0x04;\r
18 \r
19     /**\r
20      * Testing {@link HelloMessageFactory} for correct translation into POJO\r
21      */\r
22     @Test\r
23     public void test() {\r
24         ByteBuf bb = BufferHelper.buildBuffer();\r
25         HelloMessage builtByFactory = BufferHelper.decodeV13(\r
26                 HelloMessageFactory.getInstance(), bb);\r
27 \r
28         BufferHelper.checkHeaderV13(builtByFactory);\r
29     }\r
30 }\r