diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/EcmpShortestPathGraph.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/EcmpShortestPathGraph.java
index 4fd5991..a8cb830 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/EcmpShortestPathGraph.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/EcmpShortestPathGraph.java
@@ -342,8 +342,13 @@
 
     private Link copyDefaultLink(Link link) {
         DefaultLink src = (DefaultLink) link;
-        DefaultLink defaultLink = new DefaultLink(src.providerId(), src.src(),
-                src.dst(), src.type(), src.annotations());
+        DefaultLink defaultLink = DefaultLink.builder()
+                .providerId(src.providerId())
+                .src(src.src())
+                .dst(src.dst())
+                .type(src.type())
+                .annotations(src.annotations())
+                .build();
 
         return defaultLink;
     }
diff --git a/core/api/src/main/java/org/onosproject/net/DefaultLink.java b/core/api/src/main/java/org/onosproject/net/DefaultLink.java
index e1e48b9..1876db6 100644
--- a/core/api/src/main/java/org/onosproject/net/DefaultLink.java
+++ b/core/api/src/main/java/org/onosproject/net/DefaultLink.java
@@ -21,6 +21,9 @@
 
 import static com.google.common.base.MoreObjects.toStringHelper;
 import static org.onosproject.net.Link.State.ACTIVE;
+import static org.onosproject.net.DefaultAnnotations.EMPTY;
+import static com.google.common.base.Preconditions.checkNotNull;
+
 
 /**
  * Default infrastructure link model implementation.
@@ -42,7 +45,7 @@
      * @param type        link type
      * @param annotations optional key/value annotations
      */
-    public DefaultLink(ProviderId providerId, ConnectPoint src, ConnectPoint dst,
+    protected DefaultLink(ProviderId providerId, ConnectPoint src, ConnectPoint dst,
                        Type type, Annotations... annotations) {
         this(providerId, src, dst, type, ACTIVE, false, annotations);
     }
@@ -60,7 +63,7 @@
      * @param isExpected   indicates if the link is preconfigured
      * @param annotations optional key/value annotations
      */
-    public DefaultLink(ProviderId providerId, ConnectPoint src, ConnectPoint dst,
+    private DefaultLink(ProviderId providerId, ConnectPoint src, ConnectPoint dst,
                            Type type, State state,
                            boolean isExpected, Annotations... annotations) {
         super(providerId, annotations);
@@ -129,8 +132,130 @@
                 .add("dst", dst)
                 .add("type", type)
                 .add("state", state)
-                .add("configured", isExpected)
+                .add("expected", isExpected)
                 .toString();
     }
 
+    /**
+     * Creates a new default link builder.
+     *
+     * @return default link builder
+     */
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    /**
+     * Builder for DefaultLink objects.
+     */
+    public static final class Builder {
+        private ProviderId providerId;
+        private Annotations annotations = EMPTY;
+        private ConnectPoint src;
+        private ConnectPoint dst;
+        private Type type;
+        private State state = ACTIVE;
+        private boolean isExpected = false;
+
+        private Builder() {
+            // Hide constructor
+        }
+
+        /**
+         * Sets the providerId to be used by the builder.
+         *
+         * @param providerId new provider id
+         * @return self
+         */
+        public Builder providerId(ProviderId providerId) {
+            this.providerId = providerId;
+            return this;
+        }
+
+        /**
+         * Sets the annotations to be used by the builder.
+         *
+         * @param annotations new annotations
+         * @return self
+         */
+        public Builder annotations(Annotations annotations) {
+            this.annotations = annotations;
+            return this;
+        }
+
+        /**
+         * Sets the source connect point to be used by the builder.
+         *
+         * @param src source connect point
+         * @return self
+         */
+        public Builder src(ConnectPoint src) {
+            this.src = src;
+            return this;
+        }
+
+        /**
+         * Sets the destination connect point to be used by the builder.
+         *
+         * @param dst new destination connect point
+         * @return self
+         */
+        public Builder dst(ConnectPoint dst) {
+            this.dst = dst;
+            return this;
+        }
+
+        /**
+         * Sets the link type to be used by the builder.
+         *
+         * @param type new link type
+         * @return self
+         */
+        public Builder type(Type type) {
+            this.type = type;
+            return this;
+        }
+
+        /**
+         * Sets the link state to be used by the builder.
+         *
+         * @param state new link state
+         * @return self
+         */
+        public Builder state(State state) {
+            this.state = state;
+            return this;
+        }
+
+        /**
+         * Sets the expected flag to be used by the builder.
+         *
+         * @param isExpected new expected flag
+         * @return self
+         */
+        public Builder isExpected(boolean isExpected) {
+            this.isExpected = isExpected;
+            return this;
+        }
+
+        /**
+         * Builds a default link object from the accumulated parameters.
+         *
+         * @return default link object
+         */
+        public DefaultLink build() {
+            checkNotNull(src, "Source connect point cannot be null");
+            checkNotNull(dst, "Destination connect point cannot be null");
+            checkNotNull(type, "Type cannot be null");
+            checkNotNull(providerId, "Provider Id cannot be null");
+
+            return new DefaultLink(providerId, src, dst,
+                                   type, state,
+                                   isExpected, annotations);
+        }
+
+    }
+
+
+
 }
diff --git a/core/api/src/test/java/org/onosproject/net/intent/PathIntentTest.java b/core/api/src/test/java/org/onosproject/net/intent/PathIntentTest.java
index 9e67534..918e3b3 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/PathIntentTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/PathIntentTest.java
@@ -51,8 +51,18 @@
     private final ConnectPoint cp2 = new ConnectPoint(device1, port2);
     private final ConnectPoint cp3 = new ConnectPoint(device2, port3);
     private final ConnectPoint cp4 = new ConnectPoint(device2, port4);
-    private final DefaultLink link1 = new DefaultLink(provider1, cp1, cp2, DIRECT);
-    private final DefaultLink link2 = new DefaultLink(provider1, cp1, cp2, DIRECT);
+    private final DefaultLink link1 = DefaultLink.builder()
+            .providerId(provider1)
+            .src(cp1)
+            .dst(cp2)
+            .type(DIRECT)
+            .build();
+    private final DefaultLink link2 = DefaultLink.builder()
+            .providerId(provider1)
+            .src(cp1)
+            .dst(cp2)
+            .type(DIRECT)
+            .build();
     private final double cost = 1;
 
     @Test
diff --git a/core/api/src/test/java/org/onosproject/net/intent/constraint/AnnotationConstraintTest.java b/core/api/src/test/java/org/onosproject/net/intent/constraint/AnnotationConstraintTest.java
index b87dc12..299eaef 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/constraint/AnnotationConstraintTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/constraint/AnnotationConstraintTest.java
@@ -59,7 +59,12 @@
 
         DefaultAnnotations annotations = DefaultAnnotations.builder().set(KEY, String.valueOf(VALUE)).build();
 
-        link = new DefaultLink(PID, cp(DID1, PID1), cp(DID2, PID2), DIRECT, annotations);
+        link = DefaultLink.builder()
+                .providerId(PID)
+                .src(cp(DID1, PID1))
+                .dst(cp(DID2, PID2))
+                .type(DIRECT)
+                .annotations(annotations).build();
     }
 
     /**
diff --git a/core/api/src/test/java/org/onosproject/net/intent/constraint/LatencyConstraintTest.java b/core/api/src/test/java/org/onosproject/net/intent/constraint/LatencyConstraintTest.java
index bab1749..a08caab 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/constraint/LatencyConstraintTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/constraint/LatencyConstraintTest.java
@@ -69,8 +69,20 @@
         Annotations annotations1 = DefaultAnnotations.builder().set(LATENCY, LATENCY1).build();
         Annotations annotations2 = DefaultAnnotations.builder().set(LATENCY, LATENCY2).build();
 
-        link1 = new DefaultLink(PROVIDER_ID, cp(DID1, PN1), cp(DID2, PN2), DIRECT, annotations1);
-        link2 = new DefaultLink(PROVIDER_ID, cp(DID2, PN3), cp(DID3, PN4), DIRECT, annotations2);
+        link1 = DefaultLink.builder()
+                .providerId(PROVIDER_ID)
+                .src(cp(DID1, PN1))
+                .dst(cp(DID2, PN2))
+                .type(DIRECT)
+                .annotations(annotations1)
+                .build();
+        link2 = DefaultLink.builder()
+                .providerId(PROVIDER_ID)
+                .src(cp(DID2, PN3))
+                .dst(cp(DID3, PN4))
+                .type(DIRECT)
+                .annotations(annotations2)
+                .build();
         path = new DefaultPath(PROVIDER_ID, Arrays.asList(link1, link2), 10);
     }
 
diff --git a/core/api/src/test/java/org/onosproject/net/intent/constraint/ObstacleConstraintTest.java b/core/api/src/test/java/org/onosproject/net/intent/constraint/ObstacleConstraintTest.java
index f02787f..99cd338 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/constraint/ObstacleConstraintTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/constraint/ObstacleConstraintTest.java
@@ -62,8 +62,18 @@
     public void setUp() {
         linkResourceService = createMock(LinkResourceService.class);
 
-        link1 = new DefaultLink(PROVIDER_ID, cp(DID1, PN1), cp(DID2, PN2), DIRECT);
-        link2 = new DefaultLink(PROVIDER_ID, cp(DID2, PN3), cp(DID3, PN4), DIRECT);
+        link1 = DefaultLink.builder()
+                .providerId(PROVIDER_ID)
+                .src(cp(DID1, PN1))
+                .dst(cp(DID2, PN2))
+                .type(DIRECT)
+                .build();
+        link2 = DefaultLink.builder()
+                .providerId(PROVIDER_ID)
+                .src(cp(DID2, PN3))
+                .dst(cp(DID3, PN4))
+                .type(DIRECT)
+                .build();
         path = new DefaultPath(PROVIDER_ID, Arrays.asList(link1, link2), 10);
     }
 
diff --git a/core/api/src/test/java/org/onosproject/net/intent/constraint/WaypointConstraintTest.java b/core/api/src/test/java/org/onosproject/net/intent/constraint/WaypointConstraintTest.java
index f7e212a..bbd10a6 100644
--- a/core/api/src/test/java/org/onosproject/net/intent/constraint/WaypointConstraintTest.java
+++ b/core/api/src/test/java/org/onosproject/net/intent/constraint/WaypointConstraintTest.java
@@ -62,8 +62,19 @@
     public void setUp() {
         linkResourceService = createMock(LinkResourceService.class);
 
-        link1 = new DefaultLink(PROVIDER_ID, cp(DID1, PN1), cp(DID2, PN2), DIRECT);
-        link2 = new DefaultLink(PROVIDER_ID, cp(DID2, PN3), cp(DID3, PN4), DIRECT);
+        link1 = DefaultLink.builder()
+                .providerId(PROVIDER_ID)
+                .src(cp(DID1, PN1))
+                .dst(cp(DID2, PN2))
+                .type(DIRECT)
+                .build();
+        link2 = DefaultLink.builder()
+                .providerId(PROVIDER_ID)
+                .src(cp(DID2, PN3))
+                .dst(cp(DID3, PN4))
+                .type(DIRECT)
+                .build();
+
         path = new DefaultPath(PROVIDER_ID, Arrays.asList(link1, link2), 10);
     }
 
diff --git a/core/api/src/test/java/org/onosproject/net/link/LinkEventTest.java b/core/api/src/test/java/org/onosproject/net/link/LinkEventTest.java
index 307fa69..9e30ee2 100644
--- a/core/api/src/test/java/org/onosproject/net/link/LinkEventTest.java
+++ b/core/api/src/test/java/org/onosproject/net/link/LinkEventTest.java
@@ -31,10 +31,12 @@
 public class LinkEventTest extends AbstractEventTest {
 
     private Link createLink() {
-        return new DefaultLink(new ProviderId("of", "foo"),
-                               new ConnectPoint(deviceId("of:foo"), portNumber(1)),
-                               new ConnectPoint(deviceId("of:bar"), portNumber(2)),
-                               Link.Type.INDIRECT);
+        return DefaultLink.builder()
+                .providerId(new ProviderId("of", "foo"))
+                .src(new ConnectPoint(deviceId("of:foo"), portNumber(1)))
+                .dst(new ConnectPoint(deviceId("of:bar"), portNumber(2)))
+                .type(Link.Type.INDIRECT)
+                .build();
     }
 
     @Test
diff --git a/core/api/src/test/java/org/onosproject/net/topology/DefaultTopologyEdgeTest.java b/core/api/src/test/java/org/onosproject/net/topology/DefaultTopologyEdgeTest.java
index 830e9b9f..a74882f 100644
--- a/core/api/src/test/java/org/onosproject/net/topology/DefaultTopologyEdgeTest.java
+++ b/core/api/src/test/java/org/onosproject/net/topology/DefaultTopologyEdgeTest.java
@@ -49,9 +49,19 @@
     static final ProviderId PID = new ProviderId("foo", "bar");
 
     /** D1:P1 -> D2:P1. */
-    static final Link L1 = new DefaultLink(PID, CP1, CP2, Link.Type.INDIRECT);
+    static final Link L1 = DefaultLink.builder()
+            .providerId(PID)
+            .src(CP1)
+            .dst(CP2)
+            .type(Link.Type.INDIRECT)
+            .build();
     /** D2:P1 -> D1:P2. */
-    static final Link L2 = new DefaultLink(PID, CP3, CP4, Link.Type.INDIRECT);
+    static final Link L2 = DefaultLink.builder()
+            .providerId(PID)
+            .src(CP3)
+            .dst(CP4)
+            .type(Link.Type.INDIRECT)
+            .build();
 
     @Test
     public void basics() {
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/LinkCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/LinkCodec.java
index 14ee9b7..6898a8c 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/LinkCodec.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/LinkCodec.java
@@ -75,6 +75,13 @@
         Type type = Type.valueOf(json.get(TYPE).asText());
         Annotations annotations = extractAnnotations(json, context);
 
-        return new DefaultLink(pid, src, dst, type, annotations);
+        return DefaultLink
+                .builder()
+                .providerId(pid)
+                .src(src)
+                .dst(dst)
+                .type(type)
+                .annotations(annotations)
+                .build();
     }
 }
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/LinkCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/LinkCodecTest.java
index c44b0eb..d04a91c 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/LinkCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/LinkCodecTest.java
@@ -33,13 +33,15 @@
  */
 public class LinkCodecTest {
 
-    private final Link link = new DefaultLink(JsonCodecUtils.PID,
-                                              JsonCodecUtils.CP1,
-                                              JsonCodecUtils.CP2,
-                                              Link.Type.DIRECT,
-                                              Link.State.ACTIVE,
-                                              false,
-                                              JsonCodecUtils.A1);
+    private final Link link = DefaultLink.builder()
+            .providerId(JsonCodecUtils.PID)
+            .src(JsonCodecUtils.CP1)
+            .dst(JsonCodecUtils.CP2)
+            .type(Link.Type.DIRECT)
+            .state(Link.State.ACTIVE)
+            .isExpected(false)
+            .annotations(JsonCodecUtils.A1)
+            .build();
 
     @Test
     public void linkCodecTest() {
diff --git a/core/common/src/test/java/org/onosproject/common/DefaultTopologyTest.java b/core/common/src/test/java/org/onosproject/common/DefaultTopologyTest.java
index ef0f332..f12b1fc 100644
--- a/core/common/src/test/java/org/onosproject/common/DefaultTopologyTest.java
+++ b/core/common/src/test/java/org/onosproject/common/DefaultTopologyTest.java
@@ -122,9 +122,11 @@
 
     // Short-hand for creating a link.
     public static Link link(String src, int sp, String dst, int dp) {
-        return new DefaultLink(PID, new ConnectPoint(did(src), portNumber(sp)),
-                               new ConnectPoint(did(dst), portNumber(dp)),
-                               Link.Type.DIRECT);
+        return DefaultLink.builder().providerId(PID)
+                .src(new ConnectPoint(did(src), portNumber(sp)))
+                .dst(new ConnectPoint(did(dst), portNumber(dp)))
+                .type(Link.Type.DIRECT)
+                .build();
     }
 
     // Crates a new device with the specified id
diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkResourceStoreTest.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkResourceStoreTest.java
index 238e75d..6f6d853 100644
--- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkResourceStoreTest.java
+++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkResourceStoreTest.java
@@ -76,11 +76,13 @@
                 .set(AnnotationKeys.OPTICAL_WAVES, "80")
                 .set(AnnotationKeys.BANDWIDTH, "1000")
                 .build();
-        return new DefaultLink(
-                new ProviderId("of", "foo"),
-                new ConnectPoint(deviceId(dev1), portNumber(port1)),
-                new ConnectPoint(deviceId(dev2), portNumber(port2)),
-                DIRECT, annotations);
+        return DefaultLink.builder()
+                .providerId(new ProviderId("of", "foo"))
+                .src(new ConnectPoint(deviceId(dev1), portNumber(port1)))
+                .dst(new ConnectPoint(deviceId(dev2), portNumber(port2)))
+                .type(DIRECT)
+                .annotations(annotations)
+                .build();
     }
 
     @Before
diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkStore.java
index 92b882a..ad2784d 100644
--- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkStore.java
+++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkStore.java
@@ -196,11 +196,14 @@
         if (link.isDurable()) {
             return link.state() == INACTIVE ? null :
                     updateLink(linkKey(link.src(), link.dst()), link,
-                               new DefaultLink(link.providerId(),
-                                               link.src(), link.dst(),
-                                               link.type(), INACTIVE,
-                                               link.isDurable(),
-                                               link.annotations()));
+                               DefaultLink.builder()
+                                       .providerId(link.providerId())
+                                       .src(link.src())
+                                       .dst(link.dst())
+                                       .type(link.type())
+                                       .state(INACTIVE)
+                                       .isExpected(link.isExpected())
+                                       .annotations(link.annotations()).build());
         }
         return removeLink(src, dst);
     }
@@ -327,7 +330,15 @@
         }
 
         boolean isDurable = Objects.equals(annotations.value(AnnotationKeys.DURABLE), "true");
-        return new DefaultLink(primary, src, dst, type, ACTIVE, isDurable, annotations);
+        return DefaultLink.builder()
+                .providerId(primary)
+                .src(src)
+                .dst(dst)
+                .type(type)
+                .state(ACTIVE)
+                .isExpected(isDurable)
+                .annotations(annotations)
+                .build();
     }
 
     private Map<ProviderId, LinkDescription> getOrCreateLinkDescriptions(LinkKey key) {
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java
index 4116825..7e544af 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java
@@ -88,8 +88,13 @@
 
     // Produces a reverse variant of the specified link.
     private Link reverseLink(Link link) {
-        return new DefaultLink(link.providerId(), link.dst(), link.src(),
-                               link.type(), link.state(), link.isDurable());
+        return DefaultLink.builder().providerId(link.providerId())
+                .src(link.dst())
+                .dst(link.src())
+                .type(link.type())
+                .state(link.state())
+                .isExpected(link.isExpected())
+                .build();
     }
 
     // Creates a path intent from the specified path and original connectivity intent.
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java
index c5fa371..48f0580 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java
@@ -65,9 +65,9 @@
     private final ConnectPoint d1p0 = connectPoint("s1", 10);
 
     private final Set<Link> links = ImmutableSet.of(
-            new DefaultLink(PID, d1p1, d2p0, DIRECT),
-            new DefaultLink(PID, d2p1, d3p1, DIRECT),
-            new DefaultLink(PID, d1p1, d3p1, DIRECT));
+            DefaultLink.builder().providerId(PID).src(d1p1).dst(d2p0).type(DIRECT).build(),
+            DefaultLink.builder().providerId(PID).src(d2p1).dst(d3p1).type(DIRECT).build(),
+            DefaultLink.builder().providerId(PID).src(d1p1).dst(d3p1).type(DIRECT).build());
 
     private final TrafficSelector selector = DefaultTrafficSelector.builder().build();
     private final TrafficTreatment treatment = DefaultTrafficTreatment.builder().build();
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompilerTest.java
index 6cceee1..922ea42 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompilerTest.java
@@ -77,8 +77,8 @@
 
     private final List<Link> links = Arrays.asList(
             createEdgeLink(d1pi, true),
-            new DefaultLink(PID, d1p1, d2p0, DIRECT),
-            new DefaultLink(PID, d2p1, d3p1, DIRECT),
+            DefaultLink.builder().providerId(PID).src(d1p1).dst(d2p0).type(DIRECT).build(),
+            DefaultLink.builder().providerId(PID).src(d2p1).dst(d3p1).type(DIRECT).build(),
             createEdgeLink(d3pe, false)
     );
 
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompilerTest.java
index 38a116d..0a3f9d2 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompilerTest.java
@@ -64,8 +64,8 @@
     private final ConnectPoint d3p1 = connectPoint("s3", 1);
 
     private final List<Link> links = Arrays.asList(
-            new DefaultLink(PID, d1p1, d2p0, DIRECT),
-            new DefaultLink(PID, d2p1, d3p1, DIRECT)
+            DefaultLink.builder().providerId(PID).src(d1p1).dst(d2p0).type(DIRECT).build(),
+            DefaultLink.builder().providerId(PID).src(d2p1).dst(d3p1).type(DIRECT).build()
     );
     private final int hops = links.size() + 1;
     private OpticalPathIntent intent;
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java
index dda82c6..4af8ea4 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java
@@ -84,8 +84,8 @@
 
     private final List<Link> links = Arrays.asList(
             createEdgeLink(d1p0, true),
-            new DefaultLink(PID, d1p1, d2p0, DIRECT),
-            new DefaultLink(PID, d2p1, d3p1, DIRECT),
+            DefaultLink.builder().providerId(PID).src(d1p1).dst(d2p0).type(DIRECT).build(),
+            DefaultLink.builder().providerId(PID).src(d2p1).dst(d3p1).type(DIRECT).build(),
             createEdgeLink(d3p0, false)
     );
     private final int hops = links.size() - 1;
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java
index c15ecae..80cc96c 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java
@@ -70,7 +70,8 @@
     private final ConnectPoint cp3 = new ConnectPoint(deviceId("2"), portNumber(1));
     private final ConnectPoint cp4 = new ConnectPoint(deviceId("2"), portNumber(2));
 
-    private final List<Link> links = Collections.singletonList(new DefaultLink(pid, cp2, cp4, DIRECT));
+    private final List<Link> links = Collections.singletonList(
+            DefaultLink.builder().providerId(pid).src(cp2).dst(cp4).type(DIRECT).build());
     private final Path path = new DefaultPath(pid, links, 10);
 
     private PointToPointIntent input;
diff --git a/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java b/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java
index 48851f7..8e77ac8 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/link/impl/ECLinkStore.java
@@ -317,7 +317,15 @@
         });
 
         boolean isDurable = Objects.equals(annotations.get().value(AnnotationKeys.DURABLE), "true");
-        return new DefaultLink(baseProviderId, src, dst, type, ACTIVE, isDurable, annotations.get());
+        return DefaultLink.builder()
+                .providerId(baseProviderId)
+                .src(src)
+                .dst(dst)
+                .type(type)
+                .state(ACTIVE)
+                .isExpected(isDurable)
+                .annotations(annotations.get())
+                .build();
     }
 
     // Updates, if necessary the specified link and returns the appropriate event.
@@ -346,11 +354,15 @@
             // FIXME: this will not sync link state!!!
             return link.state() == INACTIVE ? null :
                     updateLink(linkKey(link.src(), link.dst()), link,
-                               new DefaultLink(link.providerId(),
-                                               link.src(), link.dst(),
-                                               link.type(), INACTIVE,
-                                               link.isDurable(),
-                                               link.annotations()));
+                               DefaultLink.builder()
+                                       .providerId(link.providerId())
+                                       .src(link.src())
+                                       .dst(link.dst())
+                                       .type(link.type())
+                                       .state(INACTIVE)
+                                       .isExpected(link.isExpected())
+                                       .annotations(link.annotations())
+                                       .build());
         }
         return removeLink(src, dst);
     }
diff --git a/core/store/dist/src/main/java/org/onosproject/store/link/impl/GossipLinkStore.java b/core/store/dist/src/main/java/org/onosproject/store/link/impl/GossipLinkStore.java
index f24a662..cf46b15 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/link/impl/GossipLinkStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/link/impl/GossipLinkStore.java
@@ -361,11 +361,15 @@
             // FIXME: this is not the right thing to call for the gossip store; will not sync link state!!!
             return link.state() == INACTIVE ? null :
                     updateLink(linkKey(link.src(), link.dst()), link,
-                               new DefaultLink(link.providerId(),
-                                               link.src(), link.dst(),
-                                               link.type(), INACTIVE,
-                                               link.isDurable(),
-                                               link.annotations()));
+                               DefaultLink.builder()
+                                    .providerId(link.providerId())
+                                    .src(link.src())
+                                    .dst(link.dst())
+                                    .type(link.type())
+                                    .state(INACTIVE)
+                                    .isExpected(link.isExpected())
+                                    .annotations(link.annotations())
+                                    .build());
         }
         return removeLink(src, dst);
     }
@@ -605,7 +609,15 @@
         }
 
         boolean isDurable = Objects.equals(annotations.value(AnnotationKeys.DURABLE), "true");
-        return new DefaultLink(baseProviderId, src, dst, type, ACTIVE, isDurable, annotations);
+        return DefaultLink.builder()
+                .providerId(baseProviderId)
+                .src(src)
+                .dst(dst)
+                .type(type)
+                .state(ACTIVE)
+                .isExpected(isDurable)
+                .annotations(annotations)
+                .build();
     }
 
     private Map<ProviderId, Timestamped<LinkDescription>> getOrCreateLinkDescriptions(LinkKey key) {
diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/DefaultLinkSerializer.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/DefaultLinkSerializer.java
index 6cc9066..7c9231a 100644
--- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/DefaultLinkSerializer.java
+++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/DefaultLinkSerializer.java
@@ -56,6 +56,13 @@
         Type linkType = (Type) kryo.readClassAndObject(input);
         State state = (State) kryo.readClassAndObject(input);
         boolean isDurable = input.readBoolean();
-        return new DefaultLink(providerId, src, dst, linkType, state, isDurable);
+        return DefaultLink.builder()
+                .providerId(providerId)
+                .src(src)
+                .dst(dst)
+                .type(linkType)
+                .state(state)
+                .isExpected(isDurable)
+                .build();
     }
 }
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 ec676bd..54690ea 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
@@ -183,8 +183,19 @@
 
     @Test
     public void testDefaultLink() {
-        testSerializedEquals(new DefaultLink(PID, CP1, CP2, Link.Type.DIRECT));
-        testSerializedEquals(new DefaultLink(PID, CP1, CP2, Link.Type.DIRECT, A1));
+        testSerializedEquals(DefaultLink.builder()
+                                     .providerId(PID)
+                                     .src(CP1)
+                                     .dst(CP2)
+                                     .type(Link.Type.DIRECT)
+                                     .build());
+        testSerializedEquals(DefaultLink.builder()
+                                     .providerId(PID)
+                                     .src(CP1)
+                                     .dst(CP2)
+                                     .type(Link.Type.DIRECT)
+                                     .annotations(A1)
+                                     .build());
     }
 
     @Test
@@ -367,7 +378,9 @@
                         .addBandwidthRequest(32.195)
                         .build();
         Map<Link, Set<ResourceAllocation>> allocations = new HashMap<>();
-        allocations.put(new DefaultLink(PID, CP1, CP2, Type.DIRECT),
+        allocations.put(DefaultLink.builder()
+                                .providerId(PID)
+                                .src(CP1).dst(CP2).type(Type.DIRECT).build(),
                         ImmutableSet.of(new BandwidthResourceAllocation(new BandwidthResource(Bandwidth.bps(10.0))),
                                         new LambdaResourceAllocation(LambdaResource.valueOf(1))));
         testSerializable(new DefaultLinkResourceAllocations(request, allocations));
diff --git a/providers/ovsdb/tunnel/src/test/java/org/onosproject/ovsdb/provider/tunnel/OvsdbTunnelProviderTest.java b/providers/ovsdb/tunnel/src/test/java/org/onosproject/ovsdb/provider/tunnel/OvsdbTunnelProviderTest.java
index 3d1549e..03642f4 100644
--- a/providers/ovsdb/tunnel/src/test/java/org/onosproject/ovsdb/provider/tunnel/OvsdbTunnelProviderTest.java
+++ b/providers/ovsdb/tunnel/src/test/java/org/onosproject/ovsdb/provider/tunnel/OvsdbTunnelProviderTest.java
@@ -55,6 +55,13 @@
     private final TestTunnelRegistry tunnelRegistry = new TestTunnelRegistry();
     private TestTunnelProviderService providerService;
 
+    Link link = DefaultLink.builder()
+            .providerId(this.provider.id())
+            .src(ConnectPoint.deviceConnectPoint("192.168.2.3/20"))
+            .dst(ConnectPoint.deviceConnectPoint("192.168.2.4/30"))
+            .type(Link.Type.DIRECT)
+            .build();
+
     @Before
     public void setUp() {
         provider.providerRegistry = tunnelRegistry;
@@ -75,11 +82,7 @@
                 .valueOf("192.168.1.3"));
         SparseAnnotations annotations = DefaultAnnotations.builder()
                 .set("bandwidth", "1024").build();
-        Link link = new DefaultLink(
-                                    this.provider.id(),
-                                    ConnectPoint.deviceConnectPoint("192.168.2.3/20"),
-                                    ConnectPoint.deviceConnectPoint("192.168.2.4/30"),
-                                    Link.Type.DIRECT);
+
         List<Link> links = new ArrayList<Link>();
         links.add(link);
         TunnelDescription tunnel = new DefaultTunnelDescription(
@@ -104,11 +107,7 @@
                 .valueOf("192.168.1.3"));
         SparseAnnotations annotations = DefaultAnnotations.builder()
                 .set("bandwidth", "1024").build();
-        Link link = new DefaultLink(
-                                    this.provider.id(),
-                                    ConnectPoint.deviceConnectPoint("192.168.2.3/20"),
-                                    ConnectPoint.deviceConnectPoint("192.168.2.4/30"),
-                                    Link.Type.DIRECT);
+
         List<Link> links = new ArrayList<Link>();
         links.add(link);
         TunnelDescription tunnel = new DefaultTunnelDescription(
diff --git a/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java b/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java
index 648e500..d1bae5b 100644
--- a/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java
+++ b/providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java
@@ -480,9 +480,12 @@
 
     // Short-hand for creating a link.
     private Link link(PcepDpid src, long sp, PcepDpid dst, long dp) {
-        return new DefaultLink(id(), connectPoint(src, sp), connectPoint(dst,
-                                                                         dp),
-                               Link.Type.TUNNEL);
+        return DefaultLink.builder()
+                .providerId(id())
+                .src(connectPoint(src, sp))
+                .dst(connectPoint(dst, dp))
+                .type(Link.Type.TUNNEL)
+                .build();
     }
 
     // Creates a path that leads through the given devices.
@@ -1132,7 +1135,12 @@
                     } else {
                         IpAddress dstIp = IpAddress.valueOf(ipv4SubObj.getIpAddress());
                         dst = new ConnectPoint(IpElementId.ipElement(dstIp), PortNumber.portNumber(0));
-                        Link link = new DefaultLink(providerId, src, dst, Link.Type.DIRECT, EMPTY);
+                        Link link = DefaultLink.builder()
+                                .providerId(providerId)
+                                .src(src)
+                                .dst(dst)
+                                .type(Link.Type.DIRECT)
+                                .build();
                         links.add(link);
                         src = dst;
                     }
diff --git a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepReleaseTunnelProviderTest.java b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepReleaseTunnelProviderTest.java
index e386138..fe08778 100644
--- a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepReleaseTunnelProviderTest.java
+++ b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepReleaseTunnelProviderTest.java
@@ -84,7 +84,8 @@
 
         ConnectPoint dst = new ConnectPoint(dstElementId, PortNumber.portNumber(10023));
 
-        Link link = new DefaultLink(pid, src, dst, Link.Type.DIRECT, EMPTY);
+        Link link = DefaultLink.builder().providerId(pid).src(src).dst(dst)
+                .type(Link.Type.DIRECT).build();
         links.add(link);
 
         path = new DefaultPath(pid, links, 20, EMPTY);
diff --git a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepSetupTunnelProviderTest.java b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepSetupTunnelProviderTest.java
index ef4816e..0a84dce 100644
--- a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepSetupTunnelProviderTest.java
+++ b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepSetupTunnelProviderTest.java
@@ -80,7 +80,8 @@
 
         ConnectPoint dst = new ConnectPoint(dstElementId, PortNumber.portNumber(10023));
 
-        Link link = new DefaultLink(pid, src, dst, Link.Type.DIRECT, EMPTY);
+        Link link = DefaultLink.builder().providerId(pid).src(src).dst(dst)
+                .type(Link.Type.DIRECT).build();
         links.add(link);
 
         path = new DefaultPath(pid, links, 10, EMPTY);
diff --git a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProviderTest.java b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProviderTest.java
index 0fcd144..a4c7098 100644
--- a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProviderTest.java
+++ b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProviderTest.java
@@ -79,7 +79,8 @@
 
         ConnectPoint dst = new ConnectPoint(dstElementId, PortNumber.portNumber(10023));
 
-        Link link = new DefaultLink(pid, src, dst, Link.Type.DIRECT, EMPTY);
+        Link link = DefaultLink.builder().providerId(pid).src(src).dst(dst)
+                .type(Link.Type.DIRECT).build();
         links.add(link);
 
         path = new DefaultPath(pid, links, 10, EMPTY);
diff --git a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepUpdateTunnelProviderTest.java b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepUpdateTunnelProviderTest.java
index 1bcf99d..1a0f1b7 100644
--- a/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepUpdateTunnelProviderTest.java
+++ b/providers/pcep/tunnel/src/test/java/org/onosproject/provider/pcep/tunnel/impl/PcepUpdateTunnelProviderTest.java
@@ -83,7 +83,8 @@
 
         ConnectPoint dst = new ConnectPoint(dstElementId, PortNumber.portNumber(10023));
 
-        Link link = new DefaultLink(pid, src, dst, Link.Type.DIRECT, EMPTY);
+        Link link = DefaultLink.builder().providerId(pid).src(src).dst(dst)
+                .type(Link.Type.DIRECT).build();
         links.add(link);
 
         path = new DefaultPath(pid, links, 20, EMPTY);
