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