Migrate from JavaTestKit to javadsl.TestKit
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / databroker / actors / dds / ClientLocalHistoryTest.java
index 8aadd86ddbb41ce4c08958e7276473540dc4828f..963b3664974d37c06cb7c7b8d7a3608a24f734f4 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.controller.cluster.databroker.actors.dds;
 import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.CLIENT_ID;
 
 import akka.actor.ActorSystem;
-import akka.testkit.JavaTestKit;
 import akka.testkit.TestProbe;
+import akka.testkit.javadsl.TestKit;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -53,7 +53,7 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
 
     @After
     public void tearDown() throws Exception {
-        JavaTestKit.shutdownActorSystem(system);
+        TestKit.shutdownActorSystem(system);
     }
 
     @Override
@@ -105,15 +105,15 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
     @Override
     @Test
     public void testOnTransactionComplete() throws Exception {
-        final ClientTransaction transaction = object().createTransaction();
+        final ClientTransaction tx = object().createTransaction();
 
         // make transaction ready
-        object().onTransactionReady(transaction, cohort);
+        object().onTransactionReady(tx, cohort);
         // state should be set to IDLE
         Assert.assertEquals(AbstractClientHistory.State.IDLE, object.state());
 
         // complete transaction
-        object().onTransactionComplete(transaction.getIdentifier());
+        object().onTransactionComplete(tx.getIdentifier());
         // state is still IDLE
         Assert.assertEquals(AbstractClientHistory.State.IDLE, object.state());
     }
@@ -129,9 +129,9 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
     @Override
     @Test(expected = IllegalStateException.class)
     public void testOnTransactionReadyDuplicate() throws Exception {
-        final ClientTransaction transaction = object().createTransaction();
-        object().onTransactionReady(transaction, cohort);
-        object().onTransactionReady(transaction, cohort);
+        final ClientTransaction tx = object().createTransaction();
+        object().onTransactionReady(tx, cohort);
+        object().onTransactionReady(tx, cohort);
     }
 
     @Test
@@ -154,4 +154,4 @@ public class ClientLocalHistoryTest extends AbstractClientHistoryTest<ClientLoca
     public void testOnTransactionReadyAndCompleteIdleFail() throws Exception {
         object().onTransactionReady(transaction, cohort);
     }
-}
\ No newline at end of file
+}