Rename ActorContext to ActorUtils
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / databroker / actors / dds / SingleClientHistoryTest.java
index 329862ac58a1b40f7b20b719875e0c8ca2341e4a..361c9267e08419082a48595ee9542e881b197596 100644 (file)
@@ -22,7 +22,7 @@ import org.opendaylight.controller.cluster.access.client.AbstractClientConnectio
 import org.opendaylight.controller.cluster.access.client.AccessClientUtil;
 import org.opendaylight.controller.cluster.access.client.ClientActorContext;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
-import org.opendaylight.controller.cluster.datastore.utils.ActorContext;
+import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
 
 public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleClientHistory> {
     private ActorSystem system;
@@ -34,7 +34,7 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
     private AbstractTransactionCommitCohort cohort;
 
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         MockitoAnnotations.initMocks(this);
 
         system = ActorSystem.apply();
@@ -43,14 +43,14 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
         final TestProbe actorContextProbe = new TestProbe(system, "actor-context");
         clientActorContext = AccessClientUtil.createClientActorContext(
                 system, clientContextProbe.ref(), CLIENT_ID, PERSISTENCE_ID);
-        final ActorContext actorContextMock = createActorContextMock(system, actorContextProbe.ref());
-        behavior = new SimpleDataStoreClientBehavior(clientActorContext, actorContextMock, SHARD_NAME);
+        final ActorUtils actorUtilsMock = createActorUtilsMock(system, actorContextProbe.ref());
+        behavior = new SimpleDataStoreClientBehavior(clientActorContext, actorUtilsMock, SHARD_NAME);
 
         object = new SingleClientHistory(behavior, HISTORY_ID);
     }
 
     @After
-    public void tearDown() throws Exception {
+    public void tearDown() {
         TestKit.shutdownActorSystem(system);
     }
 
@@ -66,14 +66,14 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test
-    public void testDoCreateTransaction() throws Exception {
+    public void testDoCreateTransaction() {
         final ClientTransaction clientTransaction = object().doCreateTransaction();
         Assert.assertEquals(object().getIdentifier(), clientTransaction.getIdentifier().getHistoryId());
     }
 
     @Override
     @Test
-    public void testCreateHistoryProxy() throws Exception {
+    public void testCreateHistoryProxy() {
         final AbstractClientConnection<ShardBackendInfo> clientConnection = behavior.getConnection(0L);
         final ProxyHistory historyProxy = object().createHistoryProxy(HISTORY_ID, clientConnection);
         Assert.assertEquals(object().getIdentifier(), historyProxy.getIdentifier());
@@ -81,7 +81,7 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test
-    public void testDoCreateSnapshot() throws Exception {
+    public void testDoCreateSnapshot() {
         final ClientSnapshot clientSnapshot = object().doCreateSnapshot();
         Assert.assertEquals(new TransactionIdentifier(object().getIdentifier(), object().nextTx()).getHistoryId(),
                 clientSnapshot.getIdentifier().getHistoryId());
@@ -89,7 +89,7 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test
-    public void testOnTransactionComplete() throws Exception {
+    public void testOnTransactionComplete() {
         final ClientTransaction transaction = object().createTransaction();
         // make transaction ready
         object().onTransactionReady(transaction, cohort);
@@ -102,14 +102,14 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test
-    public void testOnTransactionAbort() throws Exception {
+    public void testOnTransactionAbort() {
         final ClientSnapshot clientSnapshot = object().doCreateSnapshot();
         Assert.assertTrue(clientSnapshot.abort());
     }
 
     @Override
     @Test
-    public void testOnTransactionReady() throws Exception {
+    public void testOnTransactionReady() {
         final AbstractTransactionCommitCohort result = object().onTransactionReady(
                 object().createTransaction(), cohort);
         Assert.assertEquals(result, cohort);
@@ -117,7 +117,7 @@ public class SingleClientHistoryTest extends AbstractClientHistoryTest<SingleCli
 
     @Override
     @Test(expected = IllegalStateException.class)
-    public void testOnTransactionReadyDuplicate() throws Exception {
+    public void testOnTransactionReadyDuplicate() {
         final ClientTransaction transaction = object().createTransaction();
         object().onTransactionReady(transaction, cohort);
         object().onTransactionReady(transaction, cohort);