Remove yang-test
[controller.git] / opendaylight / config / config-manager / src / test / java / org / opendaylight / controller / config / manager / testingservices / parallelapsp / test / MockedDependenciesTest.java
index 0d4fc91a51760963b5b1b6a7f7dae1792544b698..1e0bebbf06b512508aefdbd86e37081a07c88248 100644 (file)
@@ -7,6 +7,10 @@
  */
 package org.opendaylight.controller.config.manager.testingservices.parallelapsp.test;
 
+import java.io.Closeable;
+import java.io.IOException;
+import java.util.concurrent.Executor;
+import javax.management.ObjectName;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
@@ -21,11 +25,6 @@ import org.opendaylight.controller.config.manager.testingservices.threadpool.Tes
 import org.opendaylight.controller.config.spi.Module;
 import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;
 
-import javax.management.ObjectName;
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.concurrent.Executor;
-
 public class MockedDependenciesTest extends AbstractParallelAPSPTest {
     private final String threadPoolImplementationName = "mockedthreadpool";
 
@@ -40,9 +39,9 @@ public class MockedDependenciesTest extends AbstractParallelAPSPTest {
                 mockedThreadPoolConfigFactory));
     }
 
-    public static interface MockedTestingThreadPoolConfigMXBean extends
+    public interface MockedTestingThreadPoolConfigMXBean extends
             TestingThreadPoolConfigMXBean {
-        public void setThreadCount(int threadCount);
+        void setThreadCount(int threadCount);
     }
 
     public static class MockedThreadPoolModule implements Module,
@@ -54,7 +53,7 @@ public class MockedDependenciesTest extends AbstractParallelAPSPTest {
         int threadCount;
 
         public MockedThreadPoolModule(
-                DynamicMBeanWithInstance dynamicMBeanWithInstance, ModuleIdentifier moduleIdentifier) {
+                final DynamicMBeanWithInstance dynamicMBeanWithInstance, final ModuleIdentifier moduleIdentifier) {
             // no reconfiguration / reuse is supported
             this.moduleIdentifier = moduleIdentifier;
         }
@@ -65,7 +64,7 @@ public class MockedDependenciesTest extends AbstractParallelAPSPTest {
         }
 
         @Override
-        public void setThreadCount(int threadCount) {
+        public void setThreadCount(final int threadCount) {
             this.threadCount = threadCount;
         }
 
@@ -74,6 +73,11 @@ public class MockedDependenciesTest extends AbstractParallelAPSPTest {
 
         }
 
+        @Override
+        public boolean canReuse(final Module oldModule) {
+            return false;
+        }
+
         @Override
         public Closeable getInstance() {
             return new MockedThreadPool(threadCount);
@@ -89,7 +93,7 @@ public class MockedDependenciesTest extends AbstractParallelAPSPTest {
             Closeable {
         private final int threadCount;
 
-        public MockedThreadPool(int threadCount) {
+        public MockedThreadPool(final int threadCount) {
             this.threadCount = threadCount;
         }