Minimize use of ByteBufWriteUtil in bgp-parser-spi
[bgpcep.git] / bgp / parser-spi / src / test / java / org / opendaylight / protocol / bgp / parser / spi / PathIdUtilTest.java
index f0afbd30624b29061f6320fb22ff47f8d2055702..de683aa4f68c1c7fd91ca36dff9ddcbcabd1e696 100644 (file)
@@ -14,7 +14,6 @@ import io.netty.buffer.Unpooled;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
-import org.opendaylight.protocol.util.ByteBufWriteUtil;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.PathId;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.Uint32;
@@ -52,10 +51,9 @@ public class PathIdUtilTest {
 
     @Test
     public void testReadPathId() {
-        final long expected = 10L;
-        ByteBufWriteUtil.writeUnsignedInt(expected, this.buffer);
+        this.buffer.writeInt(10);
         final PathId pathId = PathIdUtil.readPathId(this.buffer);
-        Assert.assertEquals(expected, pathId.getValue().longValue());
+        Assert.assertEquals(Uint32.TEN, pathId.getValue());
     }
 
     @Test