Remove LambdaConstraint as IndexLambda is soon removed
Change-Id: I1b0a2b3e09d87bb2b8cf39136de15d0f3368f589
diff --git a/core/api/src/test/java/org/onosproject/net/intent/LinkCollectionIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/LinkCollectionIntentTest.java
index dd371c1..05158ed 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/LinkCollectionIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/LinkCollectionIntentTest.java
@@ -15,6 +15,7 @@
*/
package org.onosproject.net.intent;
+import java.time.Duration;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
@@ -22,20 +23,19 @@
import org.junit.Test;
import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.IndexedLambda;
import org.onosproject.net.Link;
import org.onosproject.net.NetTestTools;
import org.onosproject.net.flow.TrafficSelector;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
import com.google.common.collect.ImmutableSet;
import com.google.common.testing.EqualsTester;
+import org.onosproject.net.intent.constraint.LatencyConstraint;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
+import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
-import static org.hamcrest.Matchers.startsWith;
import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
import static org.onosproject.net.NetTestTools.APP_ID;
import static org.onosproject.net.NetTestTools.link;
@@ -132,7 +132,7 @@
final LinkedList<Constraint> constraints = new LinkedList<>();
links1.add(link("src", 1, "dst", 2));
- constraints.add(new LambdaConstraint(new IndexedLambda(23)));
+ constraints.add(new LatencyConstraint(Duration.ofMillis(100)));
final LinkCollectionIntent collectionIntent =
LinkCollectionIntent.builder()
.appId(APP_ID)
@@ -155,7 +155,7 @@
final List<Constraint> createdConstraints = collectionIntent.constraints();
assertThat(createdConstraints, hasSize(1));
- assertThat(createdConstraints.get(0).toString(), startsWith("LambdaConstraint"));
+ assertThat(createdConstraints.get(0), instanceOf(LatencyConstraint.class));
}
/**