Remove redundant type declarations
[mdsal.git] / dom / mdsal-dom-broker / src / test / java / org / opendaylight / mdsal / dom / broker / ShardedDOMReadTransactionAdapterTest.java
index 08963c11320e15a92f38c90cd46f898f6c4b0664..352e7a8a254acc54af001ce2971004bbccb72d32 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.mdsal.dom.broker;
 
 import static org.junit.Assert.assertEquals;
@@ -19,7 +18,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Map;
 import java.util.Optional;
-import javax.annotation.Nonnull;
+import java.util.concurrent.ExecutionException;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -50,7 +49,7 @@ public class ShardedDOMReadTransactionAdapterTest {
     }
 
     @Test
-    public void testRead() throws Exception {
+    public void testRead() throws InterruptedException, ExecutionException {
         final ListenableFuture<Optional<NormalizedNode<?, ?>>> readResult =
                 readTx.read(LogicalDatastoreType.CONFIGURATION, TestModel.TEST_PATH);
         assertTrue(readTx.exists(LogicalDatastoreType.CONFIGURATION, TestModel.TEST_PATH).get());
@@ -58,7 +57,7 @@ public class ShardedDOMReadTransactionAdapterTest {
     }
 
     @After
-    public void close() throws Exception {
+    public void close() {
         readTx.close();
     }
 
@@ -68,12 +67,11 @@ public class ShardedDOMReadTransactionAdapterTest {
             return ImmutableClassToInstanceMap.of();
         }
 
-        @Nonnull
         @Override
         public <T extends DOMDataTreeListener> ListenerRegistration<T>
-            registerListener(@Nonnull final T listener, @Nonnull final Collection<DOMDataTreeIdentifier> subtrees,
-                         final boolean allowRxMerges,
-                         @Nonnull final Collection<DOMDataTreeProducer> producers) throws DOMDataTreeLoopException {
+            registerListener(final T listener, final Collection<DOMDataTreeIdentifier> subtrees,
+                    final boolean allowRxMerges, final Collection<DOMDataTreeProducer> producers)
+                            throws DOMDataTreeLoopException {
             final Map<DOMDataTreeIdentifier, NormalizedNode<?, ?>> subtree = Maps.newHashMap();
             subtree.put(new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION, TestModel.TEST_PATH),
                     TestUtils.TEST_CONTAINER);
@@ -94,10 +92,9 @@ public class ShardedDOMReadTransactionAdapterTest {
             };
         }
 
-        @Nonnull
         @Override
-        public DOMDataTreeProducer createProducer(@Nonnull final Collection<DOMDataTreeIdentifier> subtrees) {
-            return null;
+        public DOMDataTreeProducer createProducer(final Collection<DOMDataTreeIdentifier> subtrees) {
+            throw new UnsupportedOperationException();
         }
     }
 }