*/
package org.opendaylight.controller.cluster.databroker.actors.dds;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import akka.actor.ActorRef;
import akka.actor.ActorSelection;
import akka.actor.ActorSystem;
-import akka.testkit.JavaTestKit;
import akka.testkit.TestProbe;
+import akka.testkit.javadsl.TestKit;
import java.util.Collection;
import java.util.Collections;
import java.util.function.Function;
protected abstract void doHandleOperation(T handle);
@After
- public void tearDown() throws Exception {
- JavaTestKit.shutdownActorSystem(system);
+ public void tearDown() {
+ TestKit.shutdownActorSystem(system);
}
@Test
- public void testGetIdentifier() throws Exception {
+ public void testGetIdentifier() {
Assert.assertEquals(TRANSACTION_ID, handle.getIdentifier());
}
}
@Test
- public void testEnsureClosed() throws Exception {
+ public void testEnsureClosed() {
doHandleOperation(handle);
final Collection<AbstractProxyTransaction> transactions = handle.ensureClosed();
Assert.assertNotNull(transactions);
}
@Test
- public void testEnsureProxy() throws Exception {
+ public void testEnsureProxy() {
final Function<Long, AbstractProxyTransaction> function = mock(Function.class);
final AbstractProxyTransaction expected = mock(AbstractProxyTransaction.class);
when(function.apply(0L)).thenReturn(expected);
}
@Test
- public void testParent() throws Exception {
+ public void testParent() {
Assert.assertEquals(parent, handle.parent());
}