Fix a bug : TestableGraphDBOperation#getActiveSwitches doesn't work.
diff --git a/src/test/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImplTest.java b/src/test/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImplTest.java
index 19a6d2e..09319bf 100644
--- a/src/test/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImplTest.java
+++ b/src/test/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImplTest.java
@@ -446,9 +446,9 @@
 		final String dpid2 = "00:00:00:00:0a:02";
 		final String dpid3 = "00:00:00:00:0a:03";
 		
-		ope.createNewSwitchForTest(dpid1);
-		ope.createNewSwitchForTest(dpid2);
-		ope.createNewSwitchForTest(dpid3);
+		ope.createNewSwitchForTest(dpid1).setStateForTest("ACTIVE");
+		ope.createNewSwitchForTest(dpid2).setStateForTest("ACTIVE");
+		ope.createNewSwitchForTest(dpid3).setStateForTest("ACTIVE");
 
 		TestPortObject ports1 [] = {
 				ope.createNewPortForTest(dpid1, (short)1),
diff --git a/src/test/java/net/floodlightcontroller/linkdiscovery/internal/TestableGraphDBOperation.java b/src/test/java/net/floodlightcontroller/linkdiscovery/internal/TestableGraphDBOperation.java
index 79dab76..e3ad879 100644
--- a/src/test/java/net/floodlightcontroller/linkdiscovery/internal/TestableGraphDBOperation.java
+++ b/src/test/java/net/floodlightcontroller/linkdiscovery/internal/TestableGraphDBOperation.java
@@ -1225,7 +1225,7 @@
 		List<ISwitchObject> list = new ArrayList<ISwitchObject>();
 		
 		for(ISwitchObject sw : switches) {
-			if(sw.getState().equals("ACTIVE")) {
+			if(sw.getState() != null && sw.getState().equals("ACTIVE")) {
 				list.add(sw);
 			}
 		}