package org.opendaylight.controller.cluster.datastore;
import static org.junit.Assert.assertFalse;
-import static org.mockito.Matchers.anyCollection;
+import static org.mockito.ArgumentMatchers.anyCollection;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import akka.actor.Props;
import akka.testkit.javadsl.TestKit;
import com.google.common.collect.ImmutableList;
+import java.time.Duration;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.cluster.datastore.messages.DataTreeChanged;
subject.tell(new DataTreeChanged(mockCandidates), testKit.getRef());
- testKit.within(testKit.duration("1 seconds"), () -> {
+ testKit.within(Duration.ofSeconds(1), () -> {
testKit.expectNoMessage();
verify(mockListener, never()).onDataTreeChanged(anyCollection());
return null;
while (true) {
DeadLetter deadLetter;
try {
- deadLetter = testKit.expectMsgClass(testKit.duration("1 seconds"), DeadLetter.class);
+ deadLetter = testKit.expectMsgClass(Duration.ofSeconds(1), DeadLetter.class);
} catch (AssertionError e) {
// Timed out - got no DeadLetter - this is good
break;