Adjust to yangtools-2.0.0 changes
[controller.git] / opendaylight / config / config-persister-impl / src / test / java / org / opendaylight / controller / config / persist / impl / ConfigPusherImplTest.java
index 8bfb3d73b975cb743ab4e540ce9878f029fa268a..28f6ce83c8256ea712489547a598c61d4cdb3dda 100644 (file)
@@ -19,6 +19,7 @@ import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
+
 import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
@@ -46,7 +47,7 @@ import org.opendaylight.controller.config.persist.api.Persister;
 import org.opendaylight.controller.config.spi.Module;
 import org.opendaylight.controller.config.util.ConfigRegistryClient;
 import org.opendaylight.controller.config.util.capability.Capability;
-import org.opendaylight.yangtools.yang.model.api.ModuleIdentifier;
+import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
 import org.w3c.dom.Element;
 
 public class ConfigPusherImplTest {
@@ -71,7 +72,7 @@ public class ConfigPusherImplTest {
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
-        doReturn("content").when(yangStoreService).getModuleSource(any(ModuleIdentifier.class));
+        doReturn("content").when(yangStoreService).getModuleSource(any(SourceIdentifier.class));
         doReturn("mocked snapshot").when(mockedConfigSnapshot).toString();
         doReturn("<mocked-snapshot/>").when(mockedConfigSnapshot).getConfigSnapshot();
         doReturn(Collections.<Module>emptySet()).when(yangStoreService).getModules();
@@ -93,7 +94,7 @@ public class ConfigPusherImplTest {
         try {
             configPusher.process(Lists.<AutoCloseable>newArrayList(), ManagementFactory.getPlatformMBeanServer(),
                     mockedAggregator, true);
-        } catch(IllegalStateException e) {
+        } catch(final IllegalStateException e) {
             Throwable cause = Throwables.getRootCause(e);
             assertTrue(cause instanceof ConfigPusherImpl.NotEnoughCapabilitiesException);
             final Set<String> missingCaps = ((ConfigPusherImpl.NotEnoughCapabilitiesException) cause).getMissingCaps();
@@ -145,7 +146,7 @@ public class ConfigPusherImplTest {
         configPusher.pushConfigs(Collections.singletonList(mockedConfigSnapshot));
         try {
             configPusher.processSingle(Lists.<AutoCloseable>newArrayList(), mBeanServer, mockedAggregator, true);
-        } catch (IllegalStateException e) {
+        } catch (final IllegalStateException e) {
             Throwable cause = Throwables.getRootCause(e);
             assertTrue(cause instanceof ConflictingVersionException);
             return;