Use new Uint* constants 92/85992/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 26 Nov 2019 21:24:51 +0000 (22:24 +0100)
committerRobert Varga <nite@hq.sk>
Fri, 29 Nov 2019 14:42:24 +0000 (14:42 +0000)
This uses public constants for TWO and TEN, speeding up things just
a little bit.

Change-Id: Ie9622d28293033b9fbb0bc7b6a5938763cacfe7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
44 files changed:
bgp/cli/src/test/java/org/opendaylight/protocol/bgp/cli/utils/GlobalStateCliUtilsTest.java
bgp/cli/src/test/java/org/opendaylight/protocol/bgp/cli/utils/NeighborStateCliUtilsTest.java
bgp/cli/src/test/java/org/opendaylight/protocol/bgp/cli/utils/PeerGroupStateCliUtilsTest.java
bgp/extensions/evpn/src/test/java/org/opendaylight/protocol/bgp/evpn/impl/EvpnTestUtil.java
bgp/extensions/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/FlowspecL3vpnIpv4NlriParserTest.java
bgp/extensions/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/SimpleFlowspecIpv4NlriParserTest.java
bgp/extensions/labeled-unicast/src/test/java/org/opendaylight/protocol/bgp/labeled/unicast/BgpPrefixSidTlvsTest.java
bgp/extensions/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateAttributeParserTest.java
bgp/extensions/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/SrAttributeParserTest.java
bgp/extensions/mvpn/src/test/java/org/opendaylight/protocol/bgp/mvpn/impl/attributes/PEDistinguisherLabelsAttributeHandlerTest.java
bgp/extensions/mvpn/src/test/java/org/opendaylight/protocol/bgp/mvpn/impl/attributes/PMSITunnelAttributeHandlerTestUtil.java
bgp/extensions/mvpn/src/test/java/org/opendaylight/protocol/bgp/mvpn/impl/attributes/tunnel/identifier/OpaqueUtilTest.java
bgp/extensions/mvpn/src/test/java/org/opendaylight/protocol/bgp/mvpn/impl/nlri/SharedTreeJoinHandlerTest.java
bgp/extensions/mvpn/src/test/java/org/opendaylight/protocol/bgp/mvpn/impl/nlri/SourceTreeJoinHandlerTest.java
bgp/openconfig-rp-statement/src/test/java/org/opendaylight/protocol/bgp/openconfig/routing/policy/statement/MatchCommunityTest.java
bgp/openconfig-state/src/test/java/org/opendaylight/protocol/bgp/state/StateProviderImplTest.java
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/BGPParserTest.java
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/LlGracefulCapabilityHandlerTest.java
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/message/update/AsPathAttributeParserTest.java
bgp/parser-spi/src/test/java/org/opendaylight/protocol/bgp/parser/spi/PathIdUtilTest.java
bgp/path-selection-mode/src/test/java/org/opendaylight/protocol/bgp/mode/impl/base/BasePathSelectorTest.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/AbstractAddPathTest.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/config/OpenConfigMappingUtilTest.java
bgp/topology-provider/src/test/java/org/opendaylight/bgpcep/bgp/topology/provider/LinkstateTopologyBuilderTest.java
bgp/topology-provider/src/test/java/org/opendaylight/bgpcep/bgp/topology/provider/UriBuilderTest.java
bmp/bmp-parser-impl/src/test/java/org/opendaylight/protocol/bmp/parser/message/TestUtil.java
pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPValidatorTest.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/FiniteStateMachineTest.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPObjectParserTest.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPValidatorTest.java
pcep/pcc-mock/src/test/java/org/opendaylight/protocol/pcep/pcc/mock/PCCIncrementalSyncTest.java
pcep/pcc-mock/src/test/java/org/opendaylight/protocol/pcep/pcc/mock/PCCSyncAvoidanceProcedureTest.java
pcep/pcc-mock/src/test/java/org/opendaylight/protocol/pcep/pcc/mock/PCCTriggeredLspResyncTest.java
pcep/segment-routing/src/test/java/org/opendaylight/protocol/pcep/segment/routing/SrRroSubobjectParserTest.java
pcep/segment-routing/src/test/java/org/opendaylight/protocol/pcep/segment/routing/TopologyProviderTest.java
pcep/spi/src/test/java/org/opendaylight/protocol/pcep/spi/AbstractObjectWithTlvsTest.java
pcep/spi/src/test/java/org/opendaylight/protocol/pcep/spi/RegistryTest.java
pcep/topology/cli/src/test/java/org/opendaylight/protocol/pcep/cli/utils/PcepStateUtilsTest.java
pcep/topology/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/IncrementalSynchronizationProcedureTest.java
pcep/topology/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/PCETriggeredInitialSyncProcedureTest.java
pcep/topology/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/StateSynchronizationAvoidanceProcedureTest.java
pcep/topology/topology-stats/src/test/java/org/opendaylight/bgpcep/pcep/topology/stats/rpc/TopologyStatsRpcServiceImplTest.java
pcep/tunnel/tunnel-provider/src/test/java/org/opendaylight/bgpcep/pcep/tunnel/provider/NodeChangedListenerTest.java
util/src/test/java/org/opendaylight/protocol/util/IPAddressesAndPrefixesTest.java

index 5ce10f47d4aba35e888bd62e120894a15eeae39e..6eed4e49d6fe0629b65fc8881b13116e5d5072ed 100644 (file)
@@ -55,7 +55,7 @@ public class GlobalStateCliUtilsTest {
         final GlobalBuilder builder = new GlobalBuilder().setState(new StateBuilder()
                 .setAs(AsNumber.getDefaultInstance("100"))
                 .setTotalPaths(Uint32.ONE)
-                .setTotalPrefixes(Uint32.valueOf(2))
+                .setTotalPrefixes(Uint32.TWO)
                 .build());
 
         final org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp
index 3399429387eb303a2835b597b309c8be9635a1a3..fcd6e773185f8eac2c4ff96e1ef6b59e3fbaae0c 100644 (file)
@@ -108,7 +108,7 @@ public class NeighborStateCliUtilsTest {
                 .setPrefixes(new PrefixesBuilder()
                     .setInstalled(Uint32.ONE)
                     .setReceived(Uint32.ONE)
-                    .setSent(Uint32.valueOf(2)).build())
+                    .setSent(Uint32.TWO).build())
                 .build());
         final AfiSafi afiSafi = new AfiSafiBuilder().setAfiSafiName(IPV4UNICAST.class)
                 .setState(builder.build()).build();
@@ -122,11 +122,11 @@ public class NeighborStateCliUtilsTest {
 
         final Received received = new ReceivedBuilder()
                 .setNOTIFICATION(Uint64.ONE)
-                .setUPDATE(Uint64.valueOf(10))
+                .setUPDATE(Uint64.TEN)
                 .build();
 
         final Sent sent = new SentBuilder()
-                .setNOTIFICATION(Uint64.valueOf(10))
+                .setNOTIFICATION(Uint64.TEN)
                 .setUPDATE(Uint64.ONE)
                 .build();
 
index 45af340678912c4a193f09cbdd968c0007e54976..6d37d05bd94b70dd762687f3470c8b07ab8868c3 100644 (file)
@@ -43,7 +43,7 @@ public final class PeerGroupStateCliUtilsTest {
 
         final PeerGroupStateAugmentation groupState = new PeerGroupStateAugmentationBuilder()
                 .setTotalPrefixes(Uint32.ONE)
-                .setTotalPaths(Uint32.valueOf(2))
+                .setTotalPaths(Uint32.TWO)
                 .build();
 
         peerGroup.setState(new org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.neighbor.group
index 027636dc9af228a2326f5105e18d1a02405c2989..107e090cabb4a5355ffe95717f9372cdfe1c97bc 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.protocol.bgp.evpn.impl;
 
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
@@ -35,7 +34,7 @@ public final class EvpnTestUtil {
     public static final Uint32 MPLS_LABEL_MODEL = Uint32.valueOf(24001L);
     public static final MplsLabel MPLS_LABEL = new MplsLabel(MPLS_LABEL_MODEL);
     public static final int COMMUNITY_VALUE_SIZE = 6;
-    public static final Uint32 VLAN = Uint32.valueOf(10);
+    public static final Uint32 VLAN = Uint32.TEN;
     public static final String IP_MODEL = "127.0.0.1";
     public static final IpAddress IP = new IpAddress(new Ipv4Address(IP_MODEL));
     public static final String IPV6_MODEL = "2001::1";
@@ -54,7 +53,7 @@ public final class EvpnTestUtil {
         return ImmutableContainerNodeSchemaAwareBuilder.create().withNodeIdentifier(nid);
     }
 
-    public static <T> ImmutableLeafNodeBuilder<T> createValueBuilder(final T value, NodeIdentifier nid) {
+    public static <T> ImmutableLeafNodeBuilder<T> createValueBuilder(final T value, final NodeIdentifier nid) {
         final ImmutableLeafNodeBuilder<T> valueBuilder = new ImmutableLeafNodeBuilder<>();
         valueBuilder.withNodeIdentifier(nid).withValue(value);
         return valueBuilder;
index fe4133479cf3c38d9c636bd99f27f626a4dab16e..512fcad32245b613cc71464fe843ac175f8376a7 100644 (file)
@@ -496,7 +496,7 @@ public class FlowspecL3vpnIpv4NlriParserTest {
 
     private static FlowspecType createIcmpType() {
         final List<Types> types = Lists.newArrayList(
-            new TypesBuilder().setOp(new NumericOperand(false, false, false, false, true)).setValue(Uint8.valueOf(2))
+            new TypesBuilder().setOp(new NumericOperand(false, false, false, false, true)).setValue(Uint8.TWO)
                 .build(),
             new TypesBuilder().setOp(new NumericOperand(false, true, false, false, true)).setValue(Uint8.valueOf(3))
                 .build());
index 1e8b7aa35f3cdabdac6d1ce7228b51824347e072..feefb57308dd16ba49cee8a26b723a834c71dcf6 100644 (file)
@@ -460,7 +460,7 @@ public class SimpleFlowspecIpv4NlriParserTest {
 
     private static FlowspecType createIcmpType() {
         final List<Types> types = Lists.newArrayList(
-            new TypesBuilder().setOp(new NumericOperand(false, false, false, false, true)).setValue(Uint8.valueOf(2))
+            new TypesBuilder().setOp(new NumericOperand(false, false, false, false, true)).setValue(Uint8.TWO)
                 .build(),
             new TypesBuilder().setOp(new NumericOperand(false, true, false, false, true)).setValue(Uint8.valueOf(3))
                 .build());
index a23e64aa14b40543c3b7163ce07811dcafc6c59f..c3bb9c6dca37c663868d1b9f83e3af29cd2856ef 100644 (file)
@@ -46,7 +46,7 @@ public final class BgpPrefixSidTlvsTest {
         final List<SrgbValue> list = new ArrayList<>();
 
         final Srgb srgb1 = new Srgb(Uint32.ONE);
-        final Srgb srgb2 = new Srgb(Uint32.valueOf(2));
+        final Srgb srgb2 = new Srgb(Uint32.TWO);
         list.add(new SrgbValueBuilder().setBase(srgb1).setRange(srgb2).build());
         list.add(new SrgbValueBuilder().setBase(srgb2).setRange(srgb1).build());
 
index 45066cbf96d6839e4e12c68c37c30ddb9c540c13..c50697230738408dd87d494178ebaa36248ac86a 100644 (file)
@@ -238,7 +238,7 @@ public class LinkstateAttributeParserTest {
         assertEquals(LinkProtectionType.Dedicated1to1, ls.getLinkProtection());
         assertTrue(ls.getMplsProtocol().isLdp());
         assertTrue(ls.getMplsProtocol().isRsvpte());
-        assertEquals(Uint32.valueOf(10), ls.getMetric().getValue());
+        assertEquals(Uint32.TEN, ls.getMetric().getValue());
         assertEquals(2, ls.getSharedRiskLinkGroups().size());
         assertEquals(305419896, ls.getSharedRiskLinkGroups().get(0).getValue().intValue());
         assertEquals("12K-2", ls.getLinkName());
@@ -267,7 +267,7 @@ public class LinkstateAttributeParserTest {
         assertEquals(Uint32.valueOf(5000L), ls.getLinkMinMaxDelay().getMinDelay().getValue());
         assertEquals(Uint32.valueOf(20000L), ls.getLinkMinMaxDelay().getMaxDelay().getValue());
         assertEquals(Uint32.valueOf(10000L), ls.getDelayVariation().getValue());
-        assertEquals(Uint32.valueOf(0L), ls.getLinkLoss().getValue());
+        assertEquals(Uint32.ZERO, ls.getLinkLoss().getValue());
         assertArrayEquals(new byte[] { (byte) 0x46, (byte) 0x43, (byte) 0x50, (byte) 0x00 },
                 ls.getResidualBandwidth().getValue());
         assertArrayEquals(new byte[] { (byte) 0x46, (byte) 0x43, (byte) 0x50, (byte) 0x00 },
index e65daa0624f39cc8cf8ca2383bf0e8632518f940..1b707bff0d59389bf085baa16d0fbeba2eef71a9 100644 (file)
@@ -180,10 +180,11 @@ public class SrAttributeParserTest {
         final SrCapabilities capsIsis = new SrCapabilitiesBuilder().setMplsIpv4(Boolean.TRUE).setMplsIpv6(Boolean.TRUE)
                 .setSrIpv6(Boolean.FALSE)
                 .setSidLabelIndex(new SidCaseBuilder().setSid(Uint32.valueOf(16909060L)).build())
-                .setRangeSize(Uint32.valueOf(10)).build();
+                .setRangeSize(Uint32.TEN).build();
         final SrCapabilities capsOspf = new SrCapabilitiesBuilder().setMplsIpv4(Boolean.FALSE)
-                .setMplsIpv6(Boolean.FALSE).setSrIpv6(Boolean.FALSE).setSidLabelIndex(new SidCaseBuilder()
-                    .setSid(Uint32.valueOf(16909060L)).build()).setRangeSize(Uint32.valueOf(10)).build();
+                .setMplsIpv6(Boolean.FALSE).setSrIpv6(Boolean.FALSE)
+                .setSidLabelIndex(new SidCaseBuilder().setSid(Uint32.valueOf(16909060L)).build())
+                .setRangeSize(Uint32.TEN).build();
         assertEquals(capsIsis,
             SrNodeAttributesParser.parseSrCapabilities(Unpooled.wrappedBuffer(bytesIsis), ProtocolId.IsisLevel1));
         assertEquals(capsOspf,
@@ -391,12 +392,12 @@ public class SrAttributeParserTest {
         final byte[] sidLabel = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
         final SrAdjIds srAdjId = new SrAdjIdsBuilder()
             .setFlags(ISIS_ADJ_FLAGS)
-            .setWeight(new Weight(Uint8.valueOf(10)))
+            .setWeight(new Weight(Uint8.TEN))
             .setSidLabelIndex(new Ipv6AddressCaseBuilder().setIpv6Address(
                 Ipv6Util.addressForByteBuf(Unpooled.copiedBuffer(sidLabel))).build()).build();
         final SrAdjIds ospfAdj = new SrAdjIdsBuilder()
             .setFlags(OSPF_ADJ_FLAGS)
-            .setWeight(new Weight(Uint8.valueOf(10)))
+            .setWeight(new Weight(Uint8.TEN))
             .setSidLabelIndex(new Ipv6AddressCaseBuilder().setIpv6Address(
                 Ipv6Util.addressForByteBuf(Unpooled.copiedBuffer(sidLabel))).build()).build();
 
@@ -415,7 +416,7 @@ public class SrAttributeParserTest {
         final byte[] tested = { (byte)0x60, 10, 0, 0, 1, 2, 3, 4, 0,  0x5d, (byte)0xc0 };
         final SrLanAdjIds srLanAdjId = new SrLanAdjIdsBuilder()
             .setFlags(OSPF_LAN_ADJ_FLAGS)
-            .setWeight(new Weight(Uint8.valueOf(10)))
+            .setWeight(new Weight(Uint8.TEN))
             .setNeighborId(new Ipv4Address("1.2.3.4"))
             .setSidLabelIndex(new LocalLabelCaseBuilder()
                 .setLocalLabel(new MplsLabel(Uint32.valueOf(24000L)))
@@ -435,7 +436,7 @@ public class SrAttributeParserTest {
         final byte[] systemId = { 1, 2, 3, 4, 5, 6 };
         final SrLanAdjIds srLanAdjId = new SrLanAdjIdsBuilder()
             .setFlags(ISIS_ADJ_FLAGS)
-            .setWeight(new Weight(Uint8.valueOf(10)))
+            .setWeight(new Weight(Uint8.TEN))
             .setIsoSystemId(new IsoSystemIdentifier(systemId))
             .setSidLabelIndex(new Ipv6AddressCaseBuilder().setIpv6Address(Ipv6Util.addressForByteBuf(
                 Unpooled.copiedBuffer(sidLabel))).build()).build();
index 12377cd3e0cd4273f7297777fb097c45ddae51b4..5687a52e6c4d630094ee460a52b65c37dc1b3868 100644 (file)
@@ -81,7 +81,7 @@ public final class PEDistinguisherLabelsAttributeHandlerTest {
                 .build());
         peAtt.add(new PeDistinguisherLabelAttributeBuilder()
                 .setPeAddress(new IpAddress(new Ipv4Address("127.0.0.2")))
-                .setMplsLabel(new MplsLabel(Uint32.valueOf(2)))
+                .setMplsLabel(new MplsLabel(Uint32.TWO))
                 .build());
         return new AttributesBuilder()
                 .setUnrecognizedAttributes(Collections.emptyList())
index f4cfdffbf267e5e80a35d82c6895fc3682fed809..d54f55a8a7939b9d2fb78365112632b5f0557231 100644 (file)
@@ -399,7 +399,7 @@ final class PMSITunnelAttributeHandlerTestUtil {
         opaqueValues.add(new OpaqueValueBuilder().setOpaque(OPAQUE_TEST)
                 .setOpaqueType(GENERIC_LSP_IDENTIFIER).build());
         opaqueValues.add(new OpaqueValueBuilder().setOpaque(OPAQUE_TEST2)
-                .setOpaqueType(Uint8.valueOf(2)).setOpaqueType(EXTENDED_TYPE)
+                .setOpaqueType(Uint8.TWO).setOpaqueType(EXTENDED_TYPE)
                 .setOpaqueExtendedType(Uint16.valueOf(4)).build());
         return opaqueValues;
     }
index 81c5c9fc5987848cc12ef7a0e5ac1bb7bb3abbb6..414763844bec502c0e384a202ec3aacaa2274456 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.protocol.bgp.mvpn.impl.attributes.tunnel.identifier;
 
 import static org.junit.Assert.assertArrayEquals;
@@ -71,7 +70,7 @@ public final class OpaqueUtilTest {
     private static final Opaque OPAQUE = new OpaqueValueBuilder().setOpaque(OPAQUE_TEST)
             .setOpaqueType(Uint8.ONE).build();
     private static final Opaque OPAQUE_EXTENDED = new OpaqueValueBuilder().setOpaque(OPAQUE_TEST2)
-            .setOpaqueType(Uint8.valueOf(2)).setOpaqueType(Uint8.MAX_VALUE).setOpaqueExtendedType(Uint16.valueOf(4))
+            .setOpaqueType(Uint8.TWO).setOpaqueType(Uint8.MAX_VALUE).setOpaqueExtendedType(Uint16.valueOf(4))
             .build();
     private static final List<OpaqueValue> OPAQUE_VALUE_LIST = Arrays.asList((OpaqueValue) OPAQUE,
             (OpaqueValue) OPAQUE_EXTENDED);
index 75a6f0ae5b00234fe500d1c3727c24520e3260ea..02af8f00ef4ca0dfb434c28a9fc5e60300129bb6 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.protocol.bgp.mvpn.impl.nlri;
 
 import static org.junit.Assert.assertArrayEquals;
@@ -46,7 +45,7 @@ public final class SharedTreeJoinHandlerTest {
             .setSharedTreeJoin(new SharedTreeJoinBuilder()
                     .setCMulticast(new CMulticastBuilder()
                             .setRouteDistinguisher(new RouteDistinguisher(new RdIpv4("1.2.3.4:258")))
-                            .setSourceAs(new AsNumber(Uint32.valueOf(10)))
+                            .setSourceAs(new AsNumber(Uint32.TEN))
                             .setMulticastSource(new IpAddress(new Ipv4Address("1.0.0.1")))
                             .setMulticastGroup(new CGAddressCaseBuilder()
                                     .setCGAddress(new IpAddress(new Ipv4Address("2.0.0.2"))).build()).build())
index 9e95d614a608431e728555b5e947421f651cef0d..5aa191c5777cd51041d4a1c76dcf4ad8b7f90731 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.protocol.bgp.mvpn.impl.nlri;
 
 import static org.junit.Assert.assertArrayEquals;
@@ -46,7 +45,7 @@ public final class SourceTreeJoinHandlerTest {
             .setSourceTreeJoin(new SourceTreeJoinBuilder()
                     .setCMulticast(new CMulticastBuilder()
                             .setRouteDistinguisher(new RouteDistinguisher(new RdIpv4("1.2.3.4:258")))
-                            .setSourceAs(new AsNumber(Uint32.valueOf(10)))
+                            .setSourceAs(new AsNumber(Uint32.TEN))
                             .setMulticastSource(new IpAddress(new Ipv4Address("1.0.0.1")))
                             .setMulticastGroup(new CGAddressCaseBuilder().setCGAddress(
                                     new IpAddress(new Ipv4Address("2.0.0.2"))).build()).build())
index e982bc4a232b4e6e4484bfb486a21a6bcc7ce966..af1f7b036b96a8fecda069727f04b959a9b2feb6 100644 (file)
@@ -58,7 +58,7 @@ public class MatchCommunityTest extends AbstractStatementRegistryConsumerTest {
         attributeContainer = routeAttributeContainerFalse(new AttributesBuilder().setCommunities(
                 Collections.singletonList(new CommunitiesBuilder()
                         .setAsNumber(AsNumber.getDefaultInstance("65"))
-                        .setSemantics(Uint16.valueOf(10))
+                        .setSemantics(Uint16.TEN)
                         .build())).build());
 
         result = this.statementRegistry.applyExportStatement(
@@ -87,7 +87,7 @@ public class MatchCommunityTest extends AbstractStatementRegistryConsumerTest {
         attributeContainer = routeAttributeContainerFalse(new AttributesBuilder().setCommunities(
                 Collections.singletonList(new CommunitiesBuilder()
                         .setAsNumber(AsNumber.getDefaultInstance("65"))
-                        .setSemantics(Uint16.valueOf(10))
+                        .setSemantics(Uint16.TEN)
                         .build())).build());
 
         result = this.statementRegistry.applyExportStatement(
@@ -115,7 +115,7 @@ public class MatchCommunityTest extends AbstractStatementRegistryConsumerTest {
 
         attributeContainer = routeAttributeContainerFalse(new AttributesBuilder().setCommunities(Arrays.asList(
                 new CommunitiesBuilder().setAsNumber(AsNumber.getDefaultInstance("65"))
-                        .setSemantics(Uint16.valueOf(10)).build(),
+                        .setSemantics(Uint16.TEN).build(),
                 new CommunitiesBuilder().setAsNumber(AsNumber.getDefaultInstance("66"))
                         .setSemantics(Uint16.valueOf(11)).build())).build());
 
index f169234cb4877a6309b52c148bc4f93e396a0462..4616cef50d0d9c60e40630e18d8b29ef3dfae234 100644 (file)
@@ -487,7 +487,7 @@ public class StateProviderImplTest extends AbstractDataBrokerTest {
                 .setActive(true)
                 .setPrefixes(new PrefixesBuilder()
                     .setSent(Uint32.ONE)
-                    .setReceived(Uint32.valueOf(2))
+                    .setReceived(Uint32.TWO)
                     .setInstalled(Uint32.ONE)
                     .build());
         final AfiSafi afiSafi = new AfiSafiBuilder()
index 8f1d77ae09b3d562053d111d0878f988c2ba4ee4..b88892b335eb6321bed97799d4edb70f2d9448d9 100644 (file)
@@ -314,8 +314,7 @@ public class BGPParserTest {
         asNumbers.add(new AsNumber(Uint32.valueOf(30)));
         final List<Segments> asPath = new ArrayList<>();
         asPath.add(new SegmentsBuilder().setAsSequence(asNumbers).build());
-        final List<AsNumber> asSet = Lists.newArrayList(new AsNumber(Uint32.valueOf(10)),
-            new AsNumber(Uint32.valueOf(20)));
+        final List<AsNumber> asSet = Lists.newArrayList(new AsNumber(Uint32.TEN), new AsNumber(Uint32.valueOf(20)));
         asPath.add(new SegmentsBuilder().setAsSet(asSet).build());
 
         final Aggregator aggregator = new AggregatorBuilder().setAsNumber(new AsNumber(Uint32.valueOf(30)))
@@ -667,7 +666,7 @@ public class BGPParserTest {
         final List<Nlri> nlris = new ArrayList<>();
         nlris.add(new NlriBuilder().setPrefix(new Ipv4Prefix("172.17.1.0/24")).setPathId(new PathId(Uint32.ONE))
             .build());
-        nlris.add(new NlriBuilder().setPrefix(new Ipv4Prefix("172.17.1.0/24")).setPathId(new PathId(Uint32.valueOf(2)))
+        nlris.add(new NlriBuilder().setPrefix(new Ipv4Prefix("172.17.1.0/24")).setPathId(new PathId(Uint32.TWO))
             .build());
         nlris.add(new NlriBuilder().setPrefix(new Ipv4Prefix("172.17.0.0/24")).setPathId(new PathId(Uint32.ONE))
             .build());
@@ -738,7 +737,7 @@ public class BGPParserTest {
         withdrawnRoutes.add(new WithdrawnRoutesBuilder().setPrefix(new Ipv4Prefix("172.16.0.4/30"))
             .setPathId(new PathId(Uint32.ONE)).build());
         withdrawnRoutes.add(new WithdrawnRoutesBuilder().setPrefix(new Ipv4Prefix("172.16.0.4/30"))
-            .setPathId(new PathId(Uint32.valueOf(2))).build());
+            .setPathId(new PathId(Uint32.TWO)).build());
 
         // check API message
         final Update expectedMessage = new UpdateBuilder().setWithdrawnRoutes(withdrawnRoutes).build();
index 1c3ccba2b3cc2024cf3767d66333dba524dffedb..85d83cd1d256adc636166e0548b342bec26714dd 100644 (file)
@@ -63,7 +63,7 @@ public class LlGracefulCapabilityHandlerTest {
                                 .setAfi(Ipv4AddressFamily.class)
                                 .setSafi(UnicastSubsequentAddressFamily.class)
                                 .setAfiFlags(new Tables.AfiFlags(Boolean.FALSE))
-                                .setLongLivedStaleTime(Uint32.valueOf(10))
+                                .setLongLivedStaleTime(Uint32.TEN)
                                 .build(),
                         new TablesBuilder()
                                 .setAfi(Ipv6AddressFamily.class)
@@ -90,7 +90,7 @@ public class LlGracefulCapabilityHandlerTest {
                                 .setAfi(AddressFamily.class)
                                 .setSafi(UnicastSubsequentAddressFamily.class)
                                 .setAfiFlags(new Tables.AfiFlags(Boolean.FALSE))
-                                .setLongLivedStaleTime(Uint32.valueOf(10))
+                                .setLongLivedStaleTime(Uint32.TEN)
                                 .build())).build();
 
         final CParameters cParameters = new CParametersBuilder().addAugmentation(CParameters1.class,
@@ -106,7 +106,7 @@ public class LlGracefulCapabilityHandlerTest {
                         .setAfi(Ipv4AddressFamily.class)
                         .setSafi(SubsequentAddressFamily.class)
                         .setAfiFlags(new Tables.AfiFlags(Boolean.FALSE))
-                        .setLongLivedStaleTime(Uint32.valueOf(10))
+                        .setLongLivedStaleTime(Uint32.TEN)
                         .build())).build();
 
         final CParameters cParameters = new CParametersBuilder().addAugmentation(CParameters1.class,
index 8b9c8f30b3f055a8c7727cbf6f9aebd80595f54d..c326f97e708d45572aeba90e3635f7d55d5e2c0d 100644 (file)
@@ -43,8 +43,7 @@ public class AsPathAttributeParserTest {
     public void testAttributeParser() throws BGPParsingException, BGPDocumentedException {
         final List<Segments> segments = new ArrayList<>();
         segments.add(new SegmentsBuilder()
-                .setAsSet(Arrays.asList(new AsNumber(Uint32.ONE), new AsNumber(Uint32.valueOf(2))))
-                .build());
+                .setAsSet(Arrays.asList(new AsNumber(Uint32.ONE), new AsNumber(Uint32.TWO))).build());
         segments.add(new SegmentsBuilder()
                 .setAsSequence(Arrays.asList(new AsNumber(Uint32.valueOf(3)), new AsNumber(Uint32.valueOf(4))))
                 .build());
index 2f1090f22d56c73afc21fe87ccb1e7500774a7bb..f0afbd30624b29061f6320fb22ff47f8d2055702 100644 (file)
@@ -46,7 +46,7 @@ public class PathIdUtilTest {
 
     @Test
     public void testWritePathId() {
-        PathIdUtil.writePathId(new PathId(Uint32.valueOf(10)), this.buffer);
+        PathIdUtil.writePathId(new PathId(Uint32.TEN), this.buffer);
         Assert.assertEquals(Integer.BYTES, this.buffer.readableBytes());
     }
 
index b65528002c00aec64af7c8b296e5758925637407..49cab41042cf5783fa4bd946dd8853000520c95b 100644 (file)
@@ -30,10 +30,10 @@ import org.opendaylight.yangtools.yang.common.Uint32;
 
 public class BasePathSelectorTest {
     private static final List<AsNumber> SEQ_SEGMENT = Arrays.asList(
-        new AsNumber(Uint32.ONE), new AsNumber(Uint32.valueOf(2)), new AsNumber(Uint32.valueOf(3)));
+        new AsNumber(Uint32.ONE), new AsNumber(Uint32.TWO), new AsNumber(Uint32.valueOf(3)));
     static final RouterId ROUTER_ID2 = RouterId.forPeerId(new PeerId("bgp://127.0.0.1"));
     private static final List<AsNumber> SEQ_SEGMENT2 = Arrays.asList(
-        new AsNumber(Uint32.valueOf(20)), new AsNumber(Uint32.valueOf(2)), new AsNumber(Uint32.valueOf(3)));
+        new AsNumber(Uint32.valueOf(20)), new AsNumber(Uint32.TWO), new AsNumber(Uint32.valueOf(3)));
     private static final RouterId ROUTER_ID = RouterId.forAddress("127.0.0.1");
     private static final RouterId ROUTER_ID3 = RouterId.forPeerId(new PeerId("bgp://127.0.0.2"));
     private final BasePathSelector selector = new BasePathSelector(20L);
index dc721a99c53e6f054e5f52d62a0d72dda3ed1f25..e6cf3a5fd0b49018136b402ff2a6fe7f657be9ff 100644 (file)
@@ -110,7 +110,7 @@ public abstract class AbstractAddPathTest extends DefaultRibPoliciesMockTest {
     static final int HOLDTIMER = 2180;
     private static final Ipv4Address NH1 = new Ipv4Address("2.2.2.2");
     static final Update UPD_100 = createSimpleUpdate(PREFIX1, new PathId(Uint32.ONE), CLUSTER_ID, 100);
-    static final Update UPD_50 = createSimpleUpdate(PREFIX1, new PathId(Uint32.valueOf(2)), CLUSTER_ID, 50);
+    static final Update UPD_50 = createSimpleUpdate(PREFIX1, new PathId(Uint32.TWO), CLUSTER_ID, 50);
     static final Update UPD_200 = createSimpleUpdate(PREFIX1, new PathId(Uint32.valueOf(3)), CLUSTER_ID, 200);
     static final Update UPD_20 = createSimpleUpdate(PREFIX1, new PathId(Uint32.ONE), CLUSTER_ID, 20);
     static final Update UPD_NA_100 = createSimpleUpdate(PREFIX1, null, CLUSTER_ID, 100);
index f53716a5cf18c93578685a4602b0e6e16cea236d..49b13c3a6f9e9d3c357960c91b58190a89720cb7 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.protocol.bgp.rib.impl.config;
 
 import static junit.framework.TestCase.assertFalse;
@@ -120,7 +119,7 @@ public class OpenConfigMappingUtilTest {
     private static final Ipv4Address LOCAL_HOST = new Ipv4Address("127.0.0.1");
 
     private static final Uint8 ALL_PATHS = Uint8.ZERO;
-    private static final Uint8 N_PATHS = Uint8.valueOf(2);
+    private static final Uint8 N_PATHS = Uint8.TWO;
     private static final PathSelectionMode ADD_PATH_BEST_N_PATH_SELECTION =
             new AddPathBestNPathSelection(N_PATHS.toJava());
     private static final PathSelectionMode ADD_PATH_BEST_ALL_PATH_SELECTION = new AllPathSelection();
index af78be6ee461038a5dc2645b63737db9efe96f11..34d9df1e7db676b95659235cf54308aa34046670 100755 (executable)
@@ -109,7 +109,7 @@ public class LinkstateTopologyBuilderTest extends AbstractTopologyBuilderTest {
     private static final String ROUTER_2_ID = "127.0.0.2";
     private static final String NODE_1_PREFIX = "127.0.1.1/32";
     private static final AsNumber NODE_1_AS = new AsNumber(Uint32.ONE);
-    private static final AsNumber NODE_2_AS = new AsNumber(Uint32.valueOf(2));
+    private static final AsNumber NODE_2_AS = new AsNumber(Uint32.TWO);
     private static final String NODE_1_ISIS_ID = "bgpls://IsisLevel2:1/type=node&as=1&router=0000.0102.0304";
     private static final String NODE_2_ISIS_ID = "bgpls://IsisLevel2:1/type=node&as=2";
     private static final String NODE_1_OSPF_ID = "bgpls://Ospf:1/type=node&as=1&router=0000.0102.0304";
index 0e33c94703e05777b24605b50bd8061d280ee47d..cee57b87db342af14fbb862f3655bf6146682912 100644 (file)
@@ -42,7 +42,7 @@ public class UriBuilderTest {
     @Test
     public void test() {
         final LinkstateRouteBuilder routeB = new LinkstateRouteBuilder().setProtocolId(ProtocolId.Direct)
-                .setIdentifier(new Identifier(Uint64.valueOf(10)));
+                .setIdentifier(new Identifier(Uint64.TEN));
         final UriBuilder a = new UriBuilder(routeB.build());
         assertEquals("bgpls://Direct:10/", a.toString());
 
@@ -62,7 +62,7 @@ public class UriBuilderTest {
                 .setIpv4NeighborAddress(new Ipv4InterfaceIdentifier("20.20.20.20"))
                 .setMultiTopologyId(new TopologyIdentifier(Uint16.valueOf(55)))
                 .setLinkLocalIdentifier(Uint32.ONE)
-                .setLinkRemoteIdentifier(Uint32.valueOf(2))
+                .setLinkRemoteIdentifier(Uint32.TWO)
                 .build());
         final LocalNodeDescriptorsBuilder nodeB = new LocalNodeDescriptorsBuilder();
         nodeB.setAsNumber(new AsNumber(Uint32.valueOf(12))).setDomainId(new DomainIdentifier(Uint32.valueOf(15)))
@@ -74,7 +74,7 @@ public class UriBuilderTest {
         nodeR.setCRouterIdentifier(new IsisPseudonodeCaseBuilder().setIsisPseudonode(new IsisPseudonodeBuilder()
                 .setIsIsRouterIdentifier(new IsIsRouterIdentifierBuilder()
                         .setIsoSystemId(new IsoSystemIdentifier(new byte[]{1, 2, 3, 4, 5, 6}))
-                        .build()).setPsn(Uint8.valueOf(2)).build()).build());
+                        .build()).setPsn(Uint8.TWO).build()).build());
         linkB.setRemoteNodeDescriptors(nodeR.build());
         c.add(linkB.build());
         assertEquals("bgpls://1.2.3.4:258:Direct:10/type=foo&local-as=12&local-domain=15&local-area=17&"
index f76c990879a3ee04444a948b1942530a11abf275..08c7b78d80d434eec0830b2d1358b6e33e8d0840 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.protocol.bmp.parser.message;
 
 import com.google.common.collect.ImmutableList;
@@ -158,7 +157,7 @@ public final class TestUtil {
             .setAs(PEER_AS)
             .setBgpId(new Ipv4Address(bgpId))
             .setAdjRibInType(ribType)
-            .setTimestampMicro(new Timestamp(Uint32.valueOf(10)))
+            .setTimestampMicro(new Timestamp(Uint32.TEN))
             .setTimestampSec(new Timestamp(Uint32.valueOf(5)))
             .setIpv4(true)
             .setType(PeerType.forValue(0));
@@ -370,7 +369,7 @@ public final class TestUtil {
                 new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev180329.stat
                         .TlvsBuilder();
         tlvsBuilder.setAdjRibsInRoutesTlv(new AdjRibsInRoutesTlvBuilder()
-                .setCount(new Gauge64(Uint64.valueOf(10L))).build());
+                .setCount(new Gauge64(Uint64.TEN)).build());
         tlvsBuilder.setDuplicatePrefixAdvertisementsTlv(new DuplicatePrefixAdvertisementsTlvBuilder()
                 .setCount(new Counter32(Uint32.valueOf(16L))).build());
         tlvsBuilder.setDuplicateWithdrawsTlv(new DuplicateWithdrawsTlvBuilder()
@@ -392,7 +391,7 @@ public final class TestUtil {
                 .setCount(new Gauge64(Uint64.valueOf(9L))).build());
         tlvsBuilder.setPerAfiSafiLocRibTlv(new PerAfiSafiLocRibTlvBuilder()
                 .setAfi(Ipv4AddressFamily.class).setSafi(UnicastSubsequentAddressFamily.class)
-                .setCount(new Gauge64(Uint64.valueOf(10L))).build());
+                .setCount(new Gauge64(Uint64.TEN)).build());
         tlvsBuilder.setUpdatesTreatedAsWithdrawTlv(new UpdatesTreatedAsWithdrawTlvBuilder()
                 .setCount(new Counter32(Uint32.valueOf(11L))).build());
         tlvsBuilder.setPrefixesTreatedAsWithdrawTlv(new PrefixesTreatedAsWithdrawTlvBuilder()
index a27cad6e0c44222ed8c4c52a87fd945a41f03995..f995cbcabcf2086bc4b8aa53e64eb23d96010e4c 100644 (file)
@@ -582,7 +582,7 @@ public class PCEPValidatorTest {
                     .setP2mp(false)
                     .setEroCompression(false)
                     .setPriority(Uint8.ONE)
-                    .setRequestId(new RequestId(Uint32.valueOf(10)))
+                    .setRequestId(new RequestId(Uint32.TEN))
                     .setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109
                         .rp.object.rp.TlvsBuilder().build())
                     .setProcessingRule(false);
index 82d9f98eef87d42e9f25e9e90e16d1cbce9f7b24..b06570a8af524303d56c0e4a720f5e5a50f42cef 100644 (file)
@@ -199,7 +199,7 @@ public class FiniteStateMachineTest extends AbstractPCEPSessionTest {
                 if (m instanceof Pcerr) {
                     final Errors obj = ((Pcerr) m).getPcerrMessage().getErrors().get(0);
                     assertEquals(Uint8.ONE, obj.getErrorObject().getType());
-                    assertEquals(Uint8.valueOf(2), obj.getErrorObject().getValue());
+                    assertEquals(Uint8.TWO, obj.getErrorObject().getValue());
                 }
             }
         });
index 55192f468b44f9da84ea8708aa42c827d9688293..9db53cd60d4096f2d3591b4a06be15f44e5a9d22 100644 (file)
@@ -827,7 +827,7 @@ public class PCEPObjectParserTest {
 
         builder.setComputed(true)
             .setBound(false)
-            .setMetricType(Uint8.valueOf(2))
+            .setMetricType(Uint8.TWO)
             .setValue(new Float32(new byte[] { (byte) 0x4f, (byte) 0x70, (byte) 0x00, (byte) 0x00 }));
 
         assertEquals(builder.build(), parser.parseObject(new ObjectHeaderImpl(true, true),
@@ -923,7 +923,7 @@ public class PCEPObjectParserTest {
 
         result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCEPNotificationObject1WithTlv.bin"));
 
-        builder.setType(Uint8.valueOf(2))
+        builder.setType(Uint8.TWO)
             .setValue(Uint8.ONE)
             .setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109
             .notification.object.c.notification.TlvsBuilder().setOverloadDuration(
@@ -1511,7 +1511,7 @@ public class PCEPObjectParserTest {
             .setAverageProcTime(Uint32.valueOf(4))
             .setCurrentProcTime(Uint32.ONE)
             .setMaxProcTime(Uint32.valueOf(3))
-            .setMinProcTime(Uint32.valueOf(2))
+            .setMinProcTime(Uint32.TWO)
             .setVarianceProcTime(Uint32.valueOf(5))
             .build();
         final ByteBuf result = Unpooled.wrappedBuffer(proctimeBytes);
index eed8c4e84996107825030294e2f20366bc0d3b86..d18048dc05c3d6d0b0fece99291f60b0f1c6bb19 100644 (file)
@@ -209,7 +209,7 @@ public class PCEPValidatorTest {
                 .setP2mp(false)
                 .setEroCompression(false)
                 .setPriority(Uint8.ONE)
-                .setRequestId(new RequestId(Uint32.valueOf(10)))
+                .setRequestId(new RequestId(Uint32.TEN))
                 .setTlvs(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.rp
                     .object.rp.TlvsBuilder().build());
         this.rpTrue = rpBuilder.build();
@@ -339,7 +339,7 @@ public class PCEPValidatorTest {
         this.procTime = new ProcTimeBuilder()
                 .setEstimated(false)
                 .setCurrentProcTime(Uint32.ONE)
-                .setMinProcTime(Uint32.valueOf(2))
+                .setMinProcTime(Uint32.TWO)
                 .setMaxProcTime(Uint32.valueOf(3))
                 .setAverageProcTime(Uint32.valueOf(4))
                 .setVarianceProcTime(Uint32.valueOf(5))
index 8d772568c4eee88b8d90843fb489edeb8d206fb8..8863b4efddd5b90a9c4eb6bb477dd3110bbfbd50 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.protocol.pcep.pcc.mock;
 
 import io.netty.channel.Channel;
@@ -43,7 +42,7 @@ public class PCCIncrementalSyncTest extends PCCMockCommon {
         checkSynchronizedSession(8, pceSessionListener, numberOflspAndDBv);
         Thread.sleep(6000);
         final int expetecdNumberOfLspAndEndOfSync = 3;
-        final Uint64 expectedFinalDBVersion = Uint64.valueOf(10);
+        final Uint64 expectedFinalDBVersion = Uint64.TEN;
         final TestingSessionListener sessionListenerAfterReconnect = getListener(factory);
         checkResyncSession(Optional.empty(), expetecdNumberOfLspAndEndOfSync, 3, numberOflspAndDBv,
                 expectedFinalDBVersion, sessionListenerAfterReconnect);
index 312c428449d8e01fa421f5df0649e7b3471a74bf..6c2c4a6f6734be9e218299b17e514f21e1d1f7ce 100644 (file)
@@ -26,12 +26,12 @@ public class PCCSyncAvoidanceProcedureTest extends PCCMockCommon {
         final TestingSessionListenerFactory factory = new TestingSessionListenerFactory();
 
         final Channel channel = createServer(factory, this.remoteAddress, new PCCPeerProposal());
-        final PCEPSession session = createPCCSession(Uint64.valueOf(10)).get();
+        final PCEPSession session = createPCCSession(Uint64.TEN).get();
         assertNotNull(session);
         final TestingSessionListener pceSessionListener = getListener(factory);
         assertNotNull(pceSessionListener);
         assertNotNull(pceSessionListener.getSession());
-        checkResyncSession(Optional.empty(), 11, 11, null, Uint64.valueOf(10), pceSessionListener);
+        checkResyncSession(Optional.empty(), 11, 11, null, Uint64.TEN, pceSessionListener);
         channel.close().get();
     }
 
index 564e98e3048da2c5b46dbff59fd117202bcd0410..67dcd49ab46712811d75ec880193a4dd316a5c8e 100644 (file)
@@ -58,7 +58,7 @@ public class PCCTriggeredLspResyncTest extends PCCMockCommon {
         srpBuilder.setProcessingRule(Boolean.TRUE);
 
         final Srp srp = srpBuilder.build();
-        final Lsp lsp = new LspBuilder().setPlspId(new PlspId(Uint32.valueOf(2))).setSync(Boolean.TRUE).build();
+        final Lsp lsp = new LspBuilder().setPlspId(new PlspId(Uint32.TWO)).setSync(Boolean.TRUE).build();
         final UpdatesBuilder rb = new UpdatesBuilder();
         rb.setSrp(srp);
         rb.setLsp(lsp);
index bef4b2eb804dd4ae0f8c5c3c149a732b8c764e99..1d6a15c8c83ab50d0b5b8561cc6f7625c7f5d2e5 100644 (file)
@@ -180,7 +180,7 @@ public class SrRroSubobjectParserTest {
                 .setCFlag(false)
                 .setMFlag(false)
                 .setNai(new UnnumberedAdjacencyBuilder()
-                    .setLocalNodeId(Uint32.ONE).setLocalInterfaceId(Uint32.valueOf(2))
+                    .setLocalNodeId(Uint32.ONE).setLocalInterfaceId(Uint32.TWO)
                     .setRemoteNodeId(Uint32.valueOf(3)).setRemoteInterfaceId(Uint32.valueOf(4))
                     .build());
         final SubobjectBuilder subobjBuilder = new SubobjectBuilder().setSubobjectType(builder.build());
index 6856297045f8644f2333772a22f3e87df8458158..364c1d93441816606f565a542253f16503ca2280 100644 (file)
@@ -88,7 +88,7 @@ public class TopologyProviderTest extends AbstractPCEPSessionTest<Stateful07Topo
             return pcc;
         });
 
-        pcRptMsg = createSrPcRpt("1.1.1.3", "sr-path2", Uint32.valueOf(2), false);
+        pcRptMsg = createSrPcRpt("1.1.1.3", "sr-path2", Uint32.TWO, false);
         this.listener.onMessage(this.session, pcRptMsg);
         readDataOperational(getDataBroker(), this.pathComputationClientIId, pcc -> {
             //check second lsp sr-path
index 6b18576f82f232c07ef211443b88db09c9c0d04a..e582069d2e0fe58e798696519210ae304457c7b0 100644 (file)
@@ -81,7 +81,7 @@ public class AbstractObjectWithTlvsTest {
 
     @Before
     public void setUp() throws PCEPDeserializerException {
-        this.tlv = new OfListBuilder().setCodes(Collections.singletonList(new OfId(Uint16.valueOf(10)))).build();
+        this.tlv = new OfListBuilder().setCodes(Collections.singletonList(new OfId(Uint16.TEN))).build();
         this.viTlv = new VendorInformationTlvBuilder().setEnterpriseNumber(EN).build();
         doNothing().when(this.viTlvRegistry).serializeVendorInformationTlv(any(VendorInformationTlv.class),
             any(ByteBuf.class));
index 1bfa1a9b5233f29f66965b91eb931bf8a9ed9465..8a79003bad69b92014bd2b7e5b88026246ee8ba7 100644 (file)
@@ -162,7 +162,7 @@ public class RegistryTest {
         this.regs.add(this.ctx.registerLabelParser(7, this.labelParser));
         this.regs.add(this.ctx.registerLabelSerializer(Type1LabelCase.class, this.labelSerializer));
 
-        this.regs.add(this.ctx.registerVendorInformationObjectParser(new EnterpriseNumber(Uint32.valueOf(10)),
+        this.regs.add(this.ctx.registerVendorInformationObjectParser(new EnterpriseNumber(Uint32.TEN),
             this.objectParser));
         this.regs.add(this.ctx.registerVendorInformationObjectSerializer(EnterpriseSpecificInformation.class,
             this.objectSerializer));
@@ -200,7 +200,7 @@ public class RegistryTest {
         this.ctx.getMessageHandlerRegistry().serializeMessage(new KeepaliveBuilder().build(), buffer);
 
         this.ctx.getVendorInformationObjectRegistry().parseVendorInformationObject(
-            new EnterpriseNumber(Uint32.valueOf(10)), new ObjectHeaderImpl(true, false), buffer);
+            new EnterpriseNumber(Uint32.TEN), new ObjectHeaderImpl(true, false), buffer);
         this.ctx.getVendorInformationObjectRegistry().serializeVendorInformationObject(this.esi, buffer);
 
         this.ctx.getVendorInformationTlvRegistry().parseVendorInformationTlv(
index 72845c26507c7ef6323c5eb77c5aee782dc45686..d93c868e9529ebd2ff8d218ddabf6db269e1062f 100644 (file)
@@ -115,18 +115,18 @@ public class PcepStateUtilsTest extends AbstractConcurrentDataBrokerTest {
         final ReplyTime reply = new ReplyTimeBuilder()
                 .setAverageTime(Uint32.ONE)
                 .setMaxTime(Uint32.valueOf(3))
-                .setMinTime(Uint32.valueOf(2))
+                .setMinTime(Uint32.TWO)
                 .build();
 
         final ErrorMessages errorMsg = new ErrorMessagesBuilder()
                 .setReceivedErrorMsgCount(Uint32.ONE)
-                .setSentErrorMsgCount(Uint32.valueOf(2))
+                .setSentErrorMsgCount(Uint32.TWO)
                 .build();
 
         final StatefulMessagesStatsAug statefulMsg = new StatefulMessagesStatsAugBuilder()
                 .setLastReceivedRptMsgTimestamp(Uint32.valueOf(1512043769L))
                 .setSentUpdMsgCount(Uint32.ONE)
-                .setReceivedRptMsgCount(Uint32.valueOf(2))
+                .setReceivedRptMsgCount(Uint32.TWO)
                 .setSentInitMsgCount(Uint32.valueOf(3))
                 .build();
 
@@ -150,4 +150,4 @@ public class PcepStateUtilsTest extends AbstractConcurrentDataBrokerTest {
                 .setMessages(messages)
                 .build();
     }
-}
\ No newline at end of file
+}
index c7b843a9e31ed2422aa593ade73e80b75461a553..cd69d3cf2fc6b3ce8c5a6e6258e601792c29173a 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.bgpcep.pcep.topology.provider;
 
 import static org.junit.Assert.assertEquals;
@@ -73,7 +72,7 @@ public class IncrementalSynchronizationProcedureTest
 
         //session up - expect sync (LSP-DBs do not match)
         final LspDbVersion localDbVersion = new LspDbVersionBuilder()
-                .setLspDbVersionValue(Uint64.valueOf(2L)).build();
+                .setLspDbVersionValue(Uint64.TWO).build();
         session = getPCEPSession(getOpen(localDbVersion), getOpen(null));
         this.listener.onSessionUp(session);
         readDataOperational(getDataBroker(), this.pathComputationClientIId, pcc -> {
@@ -85,7 +84,7 @@ public class IncrementalSynchronizationProcedureTest
         });
 
         //report LSP2 + LSP-DB version number 2
-        final Pcrpt pcRpt2 = getPcrpt(Uint32.valueOf(2), "testsecond");
+        final Pcrpt pcRpt2 = getPcrpt(Uint32.TWO, "testsecond");
         this.listener.onMessage(session, pcRpt2);
         readDataOperational(getDataBroker(), this.pathComputationClientIId, pcc -> {
             //check node - synchronized
index 6e6a57db1b9295a9067317b49de397e33352c5c9..48ff42b74ae699cd9bc7cc9d8353999cb139ee18 100644 (file)
@@ -67,7 +67,7 @@ public class PCETriggeredInitialSyncProcedureTest
         final LspDbVersion localDbVersion = new LspDbVersionBuilder()
                 .setLspDbVersionValue(Uint64.ONE).build();
         final LspDbVersion localDbVersion2 = new LspDbVersionBuilder()
-                .setLspDbVersionValue(Uint64.valueOf(2L)).build();
+                .setLspDbVersionValue(Uint64.TWO).build();
         final PCEPSession session = getPCEPSession(getOpen(localDbVersion, Boolean.FALSE),
                 getOpen(localDbVersion2, Boolean.FALSE));
         this.listener.onSessionUp(session);
index 087c14150a1896f15a4d4e8ddb41b837c6d12a47..e3b853ef2989be7f39e0cfa38be246f1113efd1d 100644 (file)
@@ -133,7 +133,7 @@ public class StateSynchronizationAvoidanceProcedureTest extends
 
         //session up - expect sync (LSP-DBs do not match)
         final LspDbVersion localDbVersion = new LspDbVersionBuilder()
-                .setLspDbVersionValue(Uint64.valueOf(2L)).build();
+                .setLspDbVersionValue(Uint64.TWO).build();
         session = getPCEPSession(getOpen(localDbVersion), getOpen(null));
         this.listener.onSessionUp(session);
 
@@ -152,7 +152,7 @@ public class StateSynchronizationAvoidanceProcedureTest extends
                                 .params.xml.ns.yang.controller.pcep.sync.optimizations.rev181109.Tlvs1.class,
                         new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync
                                 .optimizations.rev181109.Tlvs1Builder().setLspDbVersion(new LspDbVersionBuilder()
-                                .setLspDbVersionValue(Uint64.valueOf(2L)).build()).build()).build()),
+                                .setLspDbVersionValue(Uint64.TWO).build()).build()).build()),
                 true, false), Optional.empty(),
                 createPath(Collections.emptyList()));
         this.listener.onMessage(session, syncMsg);
index f7b0694c69bb745082d6ba655007dab83ef90192..5c20b0c40aee12b864169b3c2bcccff7250f5b50 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.bgpcep.pcep.topology.stats.rpc;
 
 import static org.junit.Assert.assertEquals;
@@ -118,7 +117,7 @@ public class TopologyStatsRpcServiceImplTest extends AbstractConcurrentDataBroke
         final ReplyTime replyTime = new ReplyTimeBuilder()
                 .setAverageTime(Uint32.ONE)
                 .setMaxTime(Uint32.valueOf(3))
-                .setMinTime(Uint32.valueOf(2))
+                .setMinTime(Uint32.TWO)
                 .build();
 
         final ErrorMessages errorMsg = new ErrorMessagesBuilder()
@@ -129,7 +128,7 @@ public class TopologyStatsRpcServiceImplTest extends AbstractConcurrentDataBroke
         final StatefulMessagesStatsAug statefulMsg = new StatefulMessagesStatsAugBuilder()
                 .setLastReceivedRptMsgTimestamp(Uint32.valueOf(1553183614L))
                 .setSentUpdMsgCount(Uint32.ONE)
-                .setReceivedRptMsgCount(Uint32.valueOf(2))
+                .setReceivedRptMsgCount(Uint32.TWO)
                 .setSentInitMsgCount(Uint32.valueOf(3))
                 .build();
 
@@ -167,16 +166,16 @@ public class TopologyStatsRpcServiceImplTest extends AbstractConcurrentDataBroke
         final ReplyTime replyTime = new ReplyTimeBuilder()
                 .setAverageTime(Uint32.ONE)
                 .setMaxTime(Uint32.valueOf(3))
-                .setMinTime(Uint32.valueOf(2))
+                .setMinTime(Uint32.TWO)
                 .build();
 
         final ErrorMessages errorMsg = new ErrorMessagesBuilder()
-                .setReceivedErrorMsgCount(Uint32.ONE).setSentErrorMsgCount(Uint32.valueOf(2)).build();
+                .setReceivedErrorMsgCount(Uint32.ONE).setSentErrorMsgCount(Uint32.TWO).build();
 
         final StatefulMessagesRpcAug statefulMsg = new StatefulMessagesRpcAugBuilder()
                 .setLastReceivedRptMsgTimestamp(Uint32.valueOf(1553183614L))
                 .setSentUpdMsgCount(Uint32.ONE)
-                .setReceivedRptMsgCount(Uint32.valueOf(2))
+                .setReceivedRptMsgCount(Uint32.TWO)
                 .setSentInitMsgCount(Uint32.valueOf(3))
                 .build();
 
index 1d9a0e2687e537fc8dcdb23c178461abfe9e1716..9ba1b763a8ce483d821876ab4f578c49f5f78117 100644 (file)
@@ -76,7 +76,7 @@ public class NodeChangedListenerTest extends AbstractConcurrentDataBrokerTest {
     private static final String NODE2_IPV4 = "40.40.40.40";
     private static final NodeId NODE2_ID = new NodeId("pcc://" + NODE2_IPV4);
     private static final String LSP2_NAME = "lsp2";
-    private static final Uint32 LSP2_ID = Uint32.valueOf(2);
+    private static final Uint32 LSP2_ID = Uint32.TWO;
 
     private static final InstanceIdentifier<Topology> PCEP_TOPO_IID = InstanceIdentifier.builder(NetworkTopology.class)
             .child(Topology.class, new TopologyKey(PCEP_TOPOLOGY_ID)).build();
index dca0543f69231c02bc0275122ccef11e6966e097..3489023407af5f433d347d965b7833c858f23df7 100644 (file)
@@ -204,12 +204,12 @@ public class IPAddressesAndPrefixesTest {
     @Test
     public void testToInetSocketAddress() {
         final InetSocketAddress isa = Ipv4Util.toInetSocketAddress(new IpAddress(new Ipv4Address("123.42.13.8")),
-                new PortNumber(Uint16.valueOf(10)));
+                new PortNumber(Uint16.TEN));
         Assert.assertEquals(10, isa.getPort());
         Assert.assertEquals("123.42.13.8", InetAddresses.toAddrString(isa.getAddress()));
 
         final InetSocketAddress isa2 = Ipv4Util.toInetSocketAddress(new IpAddress(new Ipv6Address("2001:db8:1:2::")),
-                new PortNumber(Uint16.valueOf(10)));
+                new PortNumber(Uint16.TEN));
         Assert.assertEquals(10, isa2.getPort());
         Assert.assertEquals("2001:db8:1:2::", InetAddresses.toAddrString(isa2.getAddress()));
     }