Remove LambdaConstraint as IndexLambda is soon removed

Change-Id: I1b0a2b3e09d87bb2b8cf39136de15d0f3368f589
diff --git a/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
index e2753b2..4380266 100644
--- a/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/ConnectivityIntentCommand.java
@@ -27,7 +27,6 @@
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
 import org.onosproject.net.EncapsulationType;
-import org.onosproject.net.Link;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.flow.DefaultTrafficSelector;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
@@ -38,8 +37,6 @@
 import org.onosproject.net.intent.Key;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
 import org.onosproject.net.intent.constraint.EncapsulationConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
-import org.onosproject.net.intent.constraint.LinkTypeConstraint;
 import org.onosproject.net.intent.constraint.PartialFailureConstraint;
 
 import java.util.LinkedList;
@@ -171,10 +168,6 @@
             required = false, multiValued = false)
     private String bandwidthString = null;
 
-    @Option(name = "-l", aliases = "--lambda", description = "Lambda",
-            required = false, multiValued = false)
-    private boolean lambda = false;
-
     @Option(name = "--partial", description = "Allow partial installation",
             required = false, multiValued = false)
     private boolean partial = false;
@@ -381,12 +374,6 @@
             constraints.add(new BandwidthConstraint(bandwidth));
         }
 
-        // Check for a lambda specification
-        if (lambda) {
-            constraints.add(new LambdaConstraint(null));
-        }
-        constraints.add(new LinkTypeConstraint(lambda, Link.Type.OPTICAL));
-
         // Check for partial failure specification
         if (partial) {
             constraints.add(new PartialFailureConstraint());
diff --git a/core/api/src/main/java/org/onosproject/net/intent/constraint/LambdaConstraint.java b/core/api/src/main/java/org/onosproject/net/intent/constraint/LambdaConstraint.java
deleted file mode 100644
index eba2898..0000000
--- a/core/api/src/main/java/org/onosproject/net/intent/constraint/LambdaConstraint.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright 2014 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.net.intent.constraint;
-
-import com.google.common.annotations.Beta;
-import org.onosproject.net.IndexedLambda;
-import org.onosproject.net.Link;
-import org.onosproject.net.resource.link.LinkResourceService;
-import org.onosproject.net.resource.ResourceRequest;
-import org.onosproject.net.resource.ResourceType;
-
-import java.util.Objects;
-
-import static com.google.common.base.MoreObjects.toStringHelper;
-
-/**
- * Constraint that evaluates links based on available lambda.
- */
-@Beta
-public class LambdaConstraint extends BooleanConstraint {
-
-    private final IndexedLambda lambda;
-
-    /**
-     * Creates a new optical lambda constraint.
-     *
-     * @param lambda optional lambda to indicate a specific lambda
-     */
-    public LambdaConstraint(IndexedLambda lambda) {
-        this.lambda = lambda;
-    }
-
-    // Constructor for serialization
-    private LambdaConstraint() {
-        this.lambda = null;
-    }
-
-    @Override
-    public boolean isValid(Link link, LinkResourceService resourceService) {
-        for (ResourceRequest request : resourceService.getAvailableResources(link)) {
-            if (request.type() == ResourceType.LAMBDA) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Returns the lambda required by this constraint.
-     *
-     * @return required lambda
-     */
-    public IndexedLambda lambda() {
-        return lambda;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hashCode(lambda);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-        final LambdaConstraint other = (LambdaConstraint) obj;
-        return Objects.equals(this.lambda, other.lambda);
-    }
-
-    @Override
-    public String toString() {
-        return toStringHelper(this).add("lambda", lambda).toString();
-    }
-}
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceRequest.java b/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceRequest.java
index 583570f..6071717 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceRequest.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceRequest.java
@@ -31,7 +31,6 @@
 import org.onosproject.net.intent.IntentId;
 
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.resource.ResourceRequest;
 import org.onosproject.net.resource.ResourceType;
 
@@ -197,9 +196,7 @@
 
         @Override
         public LinkResourceRequest.Builder addConstraint(Constraint constraint) {
-            if (constraint instanceof LambdaConstraint) {
-                return addLambdaRequest();
-            } else if (constraint instanceof BandwidthConstraint) {
+            if (constraint instanceof BandwidthConstraint) {
                 BandwidthConstraint bw = (BandwidthConstraint) constraint;
                 return addBandwidthRequest(bw.bandwidth().bps());
             }
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));
     }
 
     /**
diff --git a/core/api/src/test/java/org/onosproject/net/intent/constraint/ConstraintObjectsTest.java b/core/api/src/test/java/org/onosproject/net/intent/constraint/ConstraintObjectsTest.java
index d2e9940..a2bc31e 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/constraint/ConstraintObjectsTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/constraint/ConstraintObjectsTest.java
@@ -17,7 +17,6 @@
 
 import org.junit.Test;
 import org.onlab.util.Bandwidth;
-import org.onosproject.net.IndexedLambda;
 import org.onosproject.net.Link;
 
 import com.google.common.testing.EqualsTester;
@@ -63,36 +62,6 @@
                 .testEquals();
     }
 
-    // Lambda Constraint
-
-    final LambdaConstraint lambdaConstraint1 =
-            new LambdaConstraint(new IndexedLambda(100));
-    final LambdaConstraint lambdaConstraintSameAs1 =
-            new LambdaConstraint(new IndexedLambda(100));
-    final LambdaConstraint lambdaConstraint2 =
-            new LambdaConstraint(new IndexedLambda(200));
-
-    /**
-     * Checks that the objects were created properly.
-     */
-    @Test
-    public void testLambdaConstraintCreation() {
-        assertThat(lambdaConstraint1.lambda().index(), is(equalTo(100L)));
-        assertThat(lambdaConstraintSameAs1.lambda().index(), is(equalTo(100L)));
-        assertThat(lambdaConstraint2.lambda().index(), is(equalTo(200L)));
-    }
-
-    /**
-     * Checks the correctness of the equals() method.
-     */
-    @Test
-    public void testLambdaConstraintEquals() {
-        new EqualsTester()
-            .addEqualityGroup(lambdaConstraint1, lambdaConstraintSameAs1)
-            .addEqualityGroup(lambdaConstraint2)
-            .testEquals();
-    }
-
     // LinkType Constraint
 
     final LinkTypeConstraint linkTypeConstraint1 =
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/DecodeConstraintCodecHelper.java b/core/common/src/main/java/org/onosproject/codec/impl/DecodeConstraintCodecHelper.java
index 40c553d..6649cbd 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/DecodeConstraintCodecHelper.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/DecodeConstraintCodecHelper.java
@@ -21,13 +21,11 @@
 
 import org.onlab.util.Bandwidth;
 import org.onosproject.net.DeviceId;
-import org.onosproject.net.IndexedLambda;
 import org.onosproject.net.Link;
 import org.onosproject.net.intent.Constraint;
 import org.onosproject.net.intent.constraint.AnnotationConstraint;
 import org.onosproject.net.intent.constraint.AsymmetricPathConstraint;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.constraint.LatencyConstraint;
 import org.onosproject.net.intent.constraint.LinkTypeConstraint;
 import org.onosproject.net.intent.constraint.ObstacleConstraint;
@@ -95,19 +93,6 @@
     }
 
     /**
-     * Decodes a lambda constraint.
-     *
-     * @return lambda constraint object.
-     */
-    private Constraint decodeLambdaConstraint() {
-        long lambda = nullIsIllegal(json.get(ConstraintCodec.LAMBDA),
-                ConstraintCodec.LAMBDA + ConstraintCodec.MISSING_MEMBER_MESSAGE)
-                .asLong();
-
-        return new LambdaConstraint(new IndexedLambda(lambda));
-    }
-
-    /**
      * Decodes a latency constraint.
      *
      * @return latency constraint object.
@@ -198,8 +183,6 @@
 
         if (type.equals(BandwidthConstraint.class.getSimpleName())) {
             return decodeBandwidthConstraint();
-        } else if (type.equals(LambdaConstraint.class.getSimpleName())) {
-            return decodeLambdaConstraint();
         } else if (type.equals(LinkTypeConstraint.class.getSimpleName())) {
             return decodeLinkTypeConstraint();
         } else if (type.equals(AnnotationConstraint.class.getSimpleName())) {
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/EncodeConstraintCodecHelper.java b/core/common/src/main/java/org/onosproject/codec/impl/EncodeConstraintCodecHelper.java
index ec4ee44..52ea495 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/EncodeConstraintCodecHelper.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/EncodeConstraintCodecHelper.java
@@ -21,7 +21,6 @@
 import org.onosproject.net.intent.Constraint;
 import org.onosproject.net.intent.constraint.AnnotationConstraint;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.constraint.LatencyConstraint;
 import org.onosproject.net.intent.constraint.LinkTypeConstraint;
 import org.onosproject.net.intent.constraint.ObstacleConstraint;
@@ -132,20 +131,6 @@
     }
 
     /**
-     * Encodes a lambda constraint.
-     *
-     * @return JSON ObjectNode representing the constraint
-     */
-    private ObjectNode encodeLambdaConstraint() {
-        checkNotNull(constraint, "Lambda constraint cannot be null");
-        final LambdaConstraint lambdaConstraint =
-                (LambdaConstraint) constraint;
-
-        return context.mapper().createObjectNode()
-                .put("lambda", lambdaConstraint.lambda().index());
-    }
-
-    /**
      * Encodes a link type constraint.
      *
      * @return JSON ObjectNode representing the constraint
@@ -179,8 +164,6 @@
         final ObjectNode result;
         if (constraint instanceof BandwidthConstraint) {
             result = encodeBandwidthConstraint();
-        } else if (constraint instanceof LambdaConstraint) {
-            result = encodeLambdaConstraint();
         } else if (constraint instanceof LinkTypeConstraint) {
             result = encodeLinkTypeConstraint();
         } else if (constraint instanceof AnnotationConstraint) {
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/ConstraintCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/ConstraintCodecTest.java
index a84dab4..2f43865 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/ConstraintCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/ConstraintCodecTest.java
@@ -28,7 +28,6 @@
 import org.onosproject.net.intent.constraint.AnnotationConstraint;
 import org.onosproject.net.intent.constraint.AsymmetricPathConstraint;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.constraint.LatencyConstraint;
 import org.onosproject.net.intent.constraint.LinkTypeConstraint;
 import org.onosproject.net.intent.constraint.ObstacleConstraint;
@@ -138,18 +137,6 @@
     }
 
     /**
-     * Tests lambda constraint.
-     */
-    @Test
-    public void lambdaConstraint() {
-        Constraint constraint = getConstraint("LambdaConstraint.json");
-        assertThat(constraint, instanceOf(LambdaConstraint.class));
-
-        LambdaConstraint lambdaConstraint = (LambdaConstraint) constraint;
-        assertThat(lambdaConstraint.lambda().index(), is(444L));
-    }
-
-    /**
      * Tests latency constraint.
      */
     @Test
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 596c7ef..f16f272d 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
@@ -59,7 +59,6 @@
 import org.onosproject.net.intent.constraint.AnnotationConstraint;
 import org.onosproject.net.intent.constraint.AsymmetricPathConstraint;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.constraint.LatencyConstraint;
 import org.onosproject.net.intent.constraint.ObstacleConstraint;
 import org.onosproject.net.intent.constraint.WaypointConstraint;
@@ -180,7 +179,6 @@
         final List<Constraint> constraints =
                 ImmutableList.of(
                         new BandwidthConstraint(Bandwidth.bps(1.0)),
-                        new LambdaConstraint(new IndexedLambda(3)),
                         new AnnotationConstraint("key", 33.0),
                         new AsymmetricPathConstraint(),
                         new LatencyConstraint(Duration.ofSeconds(2)),
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/IntentJsonMatcher.java b/core/common/src/test/java/org/onosproject/codec/impl/IntentJsonMatcher.java
index acc1f0e..7483cd7 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/IntentJsonMatcher.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/IntentJsonMatcher.java
@@ -35,7 +35,6 @@
 import org.onosproject.net.intent.PointToPointIntent;
 import org.onosproject.net.intent.constraint.AnnotationConstraint;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.constraint.LatencyConstraint;
 import org.onosproject.net.intent.constraint.LinkTypeConstraint;
 import org.onosproject.net.intent.constraint.ObstacleConstraint;
@@ -145,22 +144,6 @@
     }
 
     /**
-     * Matches a lamdba constraint against a JSON representation of the
-     * constraint.
-     *
-     * @param lambdaConstraint constraint object to match
-     * @param constraintJson JSON representation of the constraint
-     * @return true if the constraint and JSON match, false otherwise.
-     */
-    private boolean matchLambdaConstraint(LambdaConstraint lambdaConstraint,
-                                          JsonNode constraintJson) {
-        final JsonNode lambdaJson = constraintJson.get("lambda");
-        return lambdaJson != null
-                && constraintJson.get("lambda").asInt()
-                == lambdaConstraint.lambda().index();
-    }
-
-    /**
      * Matches a link type constraint against a JSON representation of the
      * constraint.
      *
@@ -307,9 +290,6 @@
         if (constraint instanceof BandwidthConstraint) {
             return matchBandwidthConstraint((BandwidthConstraint) constraint,
                     constraintJson);
-        } else if (constraint instanceof LambdaConstraint) {
-            return matchLambdaConstraint((LambdaConstraint) constraint,
-                    constraintJson);
         } else if (constraint instanceof LinkTypeConstraint) {
             return matchLinkTypeConstraint((LinkTypeConstraint) constraint,
                     constraintJson);
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java
index 5d7b5c8..c38ea53 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java
@@ -21,7 +21,6 @@
 import org.onosproject.TestApplicationId;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.IndexedLambda;
 import org.onosproject.net.Link;
 import org.onosproject.net.Path;
 import org.onosproject.net.flow.TrafficSelector;
@@ -33,7 +32,6 @@
 import org.onosproject.net.intent.PathIntent;
 import org.onosproject.net.intent.PointToPointIntent;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.impl.PathNotFoundException;
 import org.onosproject.net.resource.link.LinkResourceService;
 
@@ -266,54 +264,4 @@
             assertThat(noPath.getMessage(), containsString("No path"));
         }
     }
-
-    /**
-     * Tests that requests for available lambdas are successful.
-     */
-    @Test
-    public void testLambdaConstrainedIntentSuccess() {
-
-        final List<Constraint> constraints =
-                Collections.singletonList(new LambdaConstraint(new IndexedLambda(1)));
-        final LinkResourceService resourceService =
-                IntentTestsMocks.MockResourceService.makeLambdaResourceService(1);
-
-        final PointToPointIntent intent = makeIntent("s1", "s3", constraints);
-
-        String[] hops = {"s1", "s2", "s3"};
-        final PointToPointIntentCompiler compiler = makeCompiler(hops, resourceService);
-
-        final List<Intent> compiledIntents =
-                compiler.compile(intent, null, null);
-
-        assertThat(compiledIntents, Matchers.notNullValue());
-        assertThat(compiledIntents, hasSize(1));
-    }
-
-    /**
-     * Tests that requests for lambdas when there are no available lambdas
-     * fail.
-     */
-    @Test
-    public void testLambdaConstrainedIntentFailure() {
-
-        final List<Constraint> constraints =
-                Collections.singletonList(new LambdaConstraint(new IndexedLambda(1)));
-        final LinkResourceService resourceService =
-                IntentTestsMocks.MockResourceService.makeBandwidthResourceService(10.0);
-        try {
-            final PointToPointIntent intent = makeIntent("s1", "s3", constraints);
-
-            String[] hops = {"s1", "s2", "s3"};
-            final PointToPointIntentCompiler compiler = makeCompiler(hops, resourceService);
-
-            compiler.compile(intent, null, null);
-
-            fail("Point to Point compilation with no available lambda does "
-                    + "not throw exception.");
-        } catch (PathNotFoundException noPath) {
-            assertThat(noPath.getMessage(), containsString("No path"));
-        }
-    }
-
 }
diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
index baf7f66..617bc08 100644
--- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
+++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
@@ -172,7 +172,6 @@
 import org.onosproject.net.intent.constraint.AnnotationConstraint;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
 import org.onosproject.net.intent.constraint.BooleanConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.constraint.LatencyConstraint;
 import org.onosproject.net.intent.constraint.LinkTypeConstraint;
 import org.onosproject.net.intent.constraint.ObstacleConstraint;
@@ -454,7 +453,6 @@
                     ContinuousResourceId.class,
                     ResourceAllocation.class,
                     // Constraints
-                    LambdaConstraint.class,
                     BandwidthConstraint.class,
                     LinkTypeConstraint.class,
                     LatencyConstraint.class,
diff --git a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
index b6ece78..787f8dd 100644
--- a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
+++ b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
@@ -44,7 +44,6 @@
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.GridType;
 import org.onosproject.net.HostLocation;
-import org.onosproject.net.IndexedLambda;
 import org.onosproject.net.Link;
 import org.onosproject.net.Link.Type;
 import org.onosproject.net.LinkKey;
@@ -76,7 +75,6 @@
 import org.onosproject.net.resource.ResourceAllocation;
 import org.onosproject.net.intent.constraint.AnnotationConstraint;
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
-import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.constraint.LatencyConstraint;
 import org.onosproject.net.intent.constraint.LinkTypeConstraint;
 import org.onosproject.net.intent.constraint.ObstacleConstraint;
@@ -422,11 +420,6 @@
     }
 
     @Test
-    public void testLambdaConstraint() {
-        testSerializable(new LambdaConstraint(new IndexedLambda(1)));
-    }
-
-    @Test
     public void testBandwidthConstraint() {
         testSerializable(new BandwidthConstraint(Bandwidth.bps(1000.0)));
     }