ONOS-1334 - Allow multi to single intent across a single switch

Change-Id: I8be3dbc403ea1202fd496e666955402247f71bf1
diff --git a/core/net/src/test/java/org/onosproject/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java b/core/net/src/test/java/org/onosproject/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java
index 48a86c4..d34143c 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java
@@ -19,6 +19,7 @@
 
 import org.hamcrest.Description;
 import org.hamcrest.TypeSafeMatcher;
+import org.onosproject.net.EdgeLink;
 import org.onosproject.net.Link;
 
 /**
@@ -46,6 +47,14 @@
     @Override
     public boolean matchesSafely(Collection<Link> links) {
         for (Link link : links) {
+            if (source.equals(destination) && link instanceof EdgeLink) {
+                EdgeLink edgeLink = (EdgeLink) link;
+                if (edgeLink.hostLocation().elementId()
+                        .toString().endsWith(source)) {
+                    return true;
+                }
+            }
+
             if (link.src().elementId().toString().endsWith(source) &&
                     link.dst().elementId().toString().endsWith(destination)) {
                 return true;