- new JavaTestKit(getSystem()) {{
- ActorContext actorContext = new ActorContext(getSystem(), getRef(),
- mock(ClusterWrapper.class), mock(Configuration.class));
-
- AsyncDataChangeListener<YangInstanceIdentifier, NormalizedNode<?, ?>> mockClusteredListener =
- Mockito.mock(ClusteredDOMDataChangeListener.class);
-
- final DataChangeListenerRegistrationProxy proxy = new DataChangeListenerRegistrationProxy(
- "shard-1", actorContext, mockClusteredListener);
-
- final YangInstanceIdentifier path = YangInstanceIdentifier.of(TestModel.TEST_QNAME);
- final DataChangeScope scope = AsyncDataBroker.DataChangeScope.ONE;
- new Thread() {
- @Override
- public void run() {
- proxy.init(path, scope);
- }
-
- }.start();
-
- FiniteDuration timeout = duration("5 seconds");
- FindLocalShard findLocalShard = expectMsgClass(timeout, FindLocalShard.class);
- Assert.assertEquals("getShardName", "shard-1", findLocalShard.getShardName());
+ new JavaTestKit(getSystem()) {
+ {
+ ActorContext actorContext = new ActorContext(getSystem(), getRef(),
+ mock(ClusterWrapper.class), mock(Configuration.class));