Eliminate use of deprecated mockito methods
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / test / java / org / opendaylight / controller / cluster / raft / AbstractRaftActorIntegrationTest.java
index ac970c64e479558236fd6e03392d5cd86b074ec6..82017fa99f97eb48e874c7544efbeb066222978e 100644 (file)
@@ -24,6 +24,7 @@ import com.google.common.base.Stopwatch;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.Uninterruptibles;
 import java.io.OutputStream;
+import java.time.Duration;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -279,7 +280,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
         testkit.watch(actor);
 
         actor.tell(PoisonPill.getInstance(), null);
-        testkit.expectMsgClass(testkit.duration("5 seconds"), Terminated.class);
+        testkit.expectMsgClass(Duration.ofSeconds(5), Terminated.class);
 
         testkit.unwatch(actor);
     }
@@ -290,8 +291,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
     }
 
     protected void verifySnapshot(final String prefix, final Snapshot snapshot, final long lastAppliedTerm,
-            final long lastAppliedIndex, final long lastTerm, final long lastIndex)
-                    throws Exception {
+            final long lastAppliedIndex, final long lastTerm, final long lastIndex) {
         assertEquals(prefix + " Snapshot getLastAppliedTerm", lastAppliedTerm, snapshot.getLastAppliedTerm());
         assertEquals(prefix + " Snapshot getLastAppliedIndex", lastAppliedIndex, snapshot.getLastAppliedIndex());
         assertEquals(prefix + " Snapshot getLastTerm", lastTerm, snapshot.getLastTerm());