use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.As4GenericSpecExtendedCommunityCaseBuilder in project bgpcep by opendaylight.
the class Generic4OctASEcHandlerTest method testHandler.
@Test
public void testHandler() throws BGPDocumentedException, BGPParsingException {
final As4GenericSpecExtendedCommunityCase expected = new As4GenericSpecExtendedCommunityCaseBuilder().setAs4GenericSpecExtendedCommunity(new As4GenericSpecExtendedCommunityBuilder().setAs4SpecificCommon(AS_COMMON).build()).build();
final ExtendedCommunity exComm = this.handler.parseExtendedCommunity(Unpooled.copiedBuffer(INPUT));
Assert.assertEquals(expected, exComm);
final ByteBuf output = Unpooled.buffer(INPUT.length);
this.handler.serializeExtendedCommunity(expected, output);
Assert.assertArrayEquals(INPUT, output.array());
}
Aggregations