use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.extended.community.extended.community.SourceAs4ExtendedCommunityCase in project bgpcep by opendaylight.
the class SourceAS4OctectASHandlerTest method testHandler.
@Test
public void testHandler() {
final SourceAs4ExtendedCommunityCase expected = new SourceAs4ExtendedCommunityCaseBuilder().setSourceAs4ExtendedCommunity(new SourceAs4ExtendedCommunityBuilder().setGlobalAdministrator(new AsNumber(Uint32.valueOf(20))).build()).build();
final ExtendedCommunity exComm = this.handler.parseExtendedCommunity(Unpooled.copiedBuffer(INPUT));
assertEquals(expected, exComm);
final ByteBuf output = Unpooled.buffer(INPUT.length);
this.handler.serializeExtendedCommunity(expected, output);
Assert.assertArrayEquals(INPUT, output.array());
assertEquals(209, this.handler.getSubType());
}
Aggregations