use of org.opendaylight.protocol.pcep.ietf.stateful07.Stateful07LspUpdateErrorTlvParser in project bgpcep by opendaylight.
the class PCEPTlvParserTest method testLspErrorCodeTlv.
@Test
public void testLspErrorCodeTlv() throws PCEPDeserializerException {
final Stateful07LspUpdateErrorTlvParser parser = new Stateful07LspUpdateErrorTlvParser();
final LspErrorCode tlv = new LspErrorCodeBuilder().setErrorCode(627610883L).build();
assertEquals(tlv, parser.parseTlv(Unpooled.wrappedBuffer(ByteArray.cutBytes(lspUpdateErrorBytes, 4))));
final ByteBuf buff = Unpooled.buffer();
parser.serializeTlv(tlv, buff);
assertArrayEquals(lspUpdateErrorBytes, ByteArray.getAllBytes(buff));
}
Aggregations