Add GlobalBundleScanningSchemaServiceImpl.destroyInstance for cleanup in tests
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / GlobalBundleScanningSchemaServiceImpl.java
index c9402c62ab77c92c747183bb5ef2a7810a7dff7e..60a7e81c4c046183e6ee59e0f27d48e5a15e90bc 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.controller.sal.dom.broker;
 
 import static com.google.common.base.Preconditions.checkState;
 
+import com.google.common.annotations.VisibleForTesting;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -68,6 +69,11 @@ public class GlobalBundleScanningSchemaServiceImpl implements SchemaContextProvi
         return instance;
     }
 
+    @VisibleForTesting
+    public static synchronized void destroyInstance() {
+        instance = null;
+    }
+
     public BundleContext getContext() {
         return context;
     }