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;
@After
public void tearDown() throws Exception {
- JavaTestKit.shutdownActorSystem(system);
+ TestKit.shutdownActorSystem(system);
}
@Override
@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());
}
@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
public void testOnTransactionReadyAndCompleteIdleFail() throws Exception {
object().onTransactionReady(transaction, cohort);
}
-}
\ No newline at end of file
+}