Make TrafficTreatment.Builder.setLambda() deprecated
It is recommended to avoid to use a raw integer value to specify a lambda.
Replace uses of the deprecated method with the alternative
Change-Id: I108f0d15f4503df2a6a75c4f7c77aa0c678ff541
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/IntentCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/IntentCodecTest.java
index 95866bf..cdbd533 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/IntentCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/IntentCodecTest.java
@@ -32,6 +32,7 @@
import org.onosproject.net.DeviceId;
import org.onosproject.net.GridType;
import org.onosproject.net.HostId;
+import org.onosproject.net.IndexedLambda;
import org.onosproject.net.Lambda;
import org.onosproject.net.NetTestTools;
import org.onosproject.net.OchSignalType;
@@ -41,6 +42,7 @@
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.TrafficTreatment;
import org.onosproject.net.flow.criteria.Criteria;
+import org.onosproject.net.flow.instructions.Instructions;
import org.onosproject.net.intent.AbstractIntentTest;
import org.onosproject.net.intent.Constraint;
import org.onosproject.net.intent.HostToHostIntent;
@@ -151,7 +153,7 @@
.matchIPDst(IpPrefix.valueOf("1.2.3.4/24"))
.build();
final TrafficTreatment treatment = DefaultTrafficTreatment.builder()
- .setLambda((short) 33)
+ .add(Instructions.modL0Lambda(new IndexedLambda(33)))
.setMpls(MplsLabel.mplsLabel(44))
.setOutput(PortNumber.CONTROLLER)
.setEthDst(MacAddress.BROADCAST)