d39a8ed8e3e17d253e6e272afec4350268d17cb0
[netconf.git] / netconf / netconf-topology-singleton / src / test / java / org / opendaylight / netconf / topology / singleton / impl / actors / ReadTransactionActorTest.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.netconf.topology.singleton.impl.actors;
10
11 import akka.actor.ActorSystem;
12 import akka.testkit.TestActorRef;
13 import akka.testkit.javadsl.TestKit;
14 import org.junit.AfterClass;
15 import org.junit.Before;
16 import org.mockito.Mock;
17 import org.mockito.MockitoAnnotations;
18 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
19
20 public class ReadTransactionActorTest extends ReadTransactionActorTestAdapter {
21     private static ActorSystem system = ActorSystem.apply();
22
23     @Mock
24     private DOMDataReadOnlyTransaction mockReadTx;
25
26     @Before
27     public void setUp() {
28         MockitoAnnotations.initMocks(this);
29         init(mockReadTx, system, TestActorRef.create(system, ReadTransactionActor.props(mockReadTx)));
30     }
31
32     @AfterClass
33     public static void staticTearDown() {
34         TestKit.shutdownActorSystem(system, Boolean.TRUE);
35     }
36 }