Ooops... corrected a unit test.
diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java b/core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java
index 9ec37e1..4ebee73 100644
--- a/core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java
+++ b/core/net/src/test/java/org/onlab/onos/net/intent/TestHostToHostIntent.java
@@ -47,14 +47,13 @@
* to different Hosts. These should compare not equal.
*/
@Test
- public void testLinksDifferentEquals() {
-
+ public void testSameEquals2() {
HostId one = hid("00:00:00:00:00:01/-1");
HostId two = hid("00:00:00:00:00:02/-1");
HostToHostIntent i1 = makeHostToHost(one, two);
HostToHostIntent i2 = makeHostToHost(two, one);
- assertThat(i1, is(not(equalTo(i2))));
+ assertThat(i1, is(equalTo(i2)));
}
/**
@@ -76,12 +75,27 @@
* objects are different.
*/
@Test
- public void testHashCodeDifferent() {
+ public void testHashCodeEquals2() {
HostId one = hid("00:00:00:00:00:01/-1");
HostId two = hid("00:00:00:00:00:02/-1");
HostToHostIntent i1 = makeHostToHost(one, two);
HostToHostIntent i2 = makeHostToHost(two, one);
+ assertThat(i1.hashCode(), is(equalTo(i2.hashCode())));
+ }
+
+ /**
+ * Tests that the hashCode() values for two distinct LinkCollectionIntent
+ * objects are different.
+ */
+ @Test
+ public void testHashCodeDifferent() {
+ HostId one = hid("00:00:00:00:00:01/-1");
+ HostId two = hid("00:00:00:00:00:02/-1");
+ HostId three = hid("00:00:00:00:00:32/-1");
+ HostToHostIntent i1 = makeHostToHost(one, two);
+ HostToHostIntent i2 = makeHostToHost(one, three);
+
assertThat(i1.hashCode(), is(not(equalTo(i2.hashCode()))));
}