import akka.actor.ActorSelection;
import akka.actor.ActorSystem;
import akka.actor.Status;
-import akka.testkit.JavaTestKit;
import akka.testkit.TestProbe;
+import akka.testkit.javadsl.TestKit;
import java.util.Collections;
+import java.util.Optional;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
behavior = createBehavior(clientContext, context);
}
+ @SuppressWarnings("checkstyle:hiddenField")
protected abstract AbstractDataStoreClientBehavior createBehavior(ClientActorContext clientContext,
ActorContext context);
@After
public void tearDown() throws Exception {
- JavaTestKit.shutdownActorSystem(system);
+ TestKit.shutdownActorSystem(system);
}
@Test
public void testGetConnection() throws Exception {
//set up data tree mock
final CursorAwareDataTreeModification modification = mock(CursorAwareDataTreeModification.class);
- when(modification.readNode(YangInstanceIdentifier.EMPTY)).thenReturn(com.google.common.base.Optional.absent());
+ when(modification.readNode(YangInstanceIdentifier.EMPTY)).thenReturn(Optional.empty());
final DataTreeSnapshot snapshot = mock(DataTreeSnapshot.class);
when(snapshot.newModification()).thenReturn(modification);
final DataTree dataTree = mock(DataTree.class);
return mock;
}
-}
\ No newline at end of file
+}