use of org.opendaylight.protocol.pcep.ietf.stateful.StatefulLspSymbolicNameTlvParser in project bgpcep by opendaylight.
the class PCEPTlvParserTest method testSymbolicNameTlv.
@Test
public void testSymbolicNameTlv() throws PCEPDeserializerException {
final StatefulLspSymbolicNameTlvParser parser = new StatefulLspSymbolicNameTlvParser();
final SymbolicPathName tlv = new SymbolicPathNameBuilder().setPathName(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.SymbolicPathName("Med test of symbolic nameeee".getBytes())).build();
assertEquals(tlv, parser.parseTlv(Unpooled.wrappedBuffer(ByteArray.cutBytes(SYMBOLIC_NAME_BYTES, 4))));
final ByteBuf buff = Unpooled.buffer();
parser.serializeTlv(tlv, buff);
assertArrayEquals(SYMBOLIC_NAME_BYTES, ByteArray.getAllBytes(buff));
}
Aggregations