Add the switchStorageImpl unit tests.
diff --git a/src/test/java/net/floodlightcontroller/core/internal/TestDatabaseManager.java b/src/test/java/net/floodlightcontroller/core/internal/TestDatabaseManager.java
index 3d5e03b..f811c9d 100644
--- a/src/test/java/net/floodlightcontroller/core/internal/TestDatabaseManager.java
+++ b/src/test/java/net/floodlightcontroller/core/internal/TestDatabaseManager.java
@@ -58,8 +58,17 @@
Iterator<Vertex> it = titanGraph.getVertices("type", "port").iterator();
while (it.hasNext()){
Vertex port = it.next();
- Integer portNum = (Integer) port.getProperty("number");
- port.setProperty("number", portNum.shortValue());
+
+ if(port.getProperty("number") instanceof Short)
+ {
+ Short portNum = (Short) port.getProperty("number");
+ port.setProperty("number", portNum.shortValue());
+ }
+ else{
+ Integer portNum = (Integer) port.getProperty("number");
+ port.setProperty("number", portNum.shortValue());
+ }
+
}
titanGraph.stopTransaction(Conclusion.SUCCESS);
}