Use hamcrest-integration library to use additional matchers
diff --git a/java_gen/pre-written/pom.xml b/java_gen/pre-written/pom.xml
index 9845e87..0cb42ac 100644
--- a/java_gen/pre-written/pom.xml
+++ b/java_gen/pre-written/pom.xml
@@ -46,6 +46,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-integration</artifactId>
+ <version>1.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<version>3.2.9.Final</version>
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/OFPortBitMapTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/OFPortBitMapTest.java
index fc214e5..4db84f1 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/OFPortBitMapTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/OFPortBitMapTest.java
@@ -1,24 +1,18 @@
package org.projectfloodlight.openflow.types;
-import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.Matchers.contains;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertThat;
import junit.framework.TestCase;
import org.junit.Test;
-import com.google.common.collect.ImmutableList;
-
public class OFPortBitMapTest extends TestCase {
@Test
public void testCreateAndIterate() {
OFPortBitMap map = OFPortBitMap.ofPorts(OFPort.of(1), OFPort.of(2), OFPort.of(5));
- assertThat(
- ImmutableList.copyOf(map.getOnPorts()),
- equalTo(
- ImmutableList.of(OFPort.of(1), OFPort.of(2), OFPort.of(5))
- ));
+ assertThat(map.getOnPorts(), contains(OFPort.of(1), OFPort.of(2), OFPort.of(5)));
}
@Test
@@ -27,11 +21,7 @@
OFPortBitMap map = OFPortBitMap.of(bitmap);
- assertThat(
- ImmutableList.copyOf(map.getOnPorts()),
- equalTo(
- ImmutableList.of(OFPort.of(1), OFPort.of(2), OFPort.of(5))
- ));
+ assertThat(map.getOnPorts(), contains(OFPort.of(1), OFPort.of(2), OFPort.of(5)));
}
@Test