@Test
public void testUint32() {
- final BgpStdCommunityType commType = BgpStdCommunityTypeBuilder.getDefaultInstance("123");
- Assert.assertEquals(123L, commType.getUint32().longValue());
+ final BgpStdCommunityType commType = BgpStdCommunityTypeBuilder.getDefaultInstance("123456");
+ Assert.assertEquals(123456L, commType.getUint32().longValue());
}
@Test(expected=IllegalArgumentException.class)
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.explicit.route.subobjects.subobject.type.path.key._case.PathKeyBuilder;
public class CommonPathKeyParserTest {
- private final byte[] bytes = new byte[]{0, 1, 2, 3};
+ private final byte[] bytes = new byte[]{0, 1, 2, 3, 4, 5};
private PathKey key1;
private PathKey key2;
private PathKey key3;
.build();
this.key3 = new PathKeyBuilder().setPathKey(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns
.yang.rsvp.rev150820.PathKey(1))
- .setPceId(new PceId(new byte[]{2, 3}))
+ .setPceId(new PceId(new byte[]{2, 3, 4, 5}))
.build();
}
@Test
public void testParsing() {
- assertEquals(this.key3, CommonPathKeyParser.parsePathKey(2, Unpooled.copiedBuffer(this.bytes)));
+ assertEquals(this.key3, CommonPathKeyParser.parsePathKey(4, Unpooled.copiedBuffer(this.bytes)));
}
}