import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
+import org.opendaylight.mdsal.dom.api.DOMDataBroker;
import org.opendaylight.netconf.sal.restconf.impl.BrokerFacade;
import org.opendaylight.netconf.sal.restconf.impl.ControllerContext;
import org.opendaylight.netconf.sal.restconf.impl.RestconfImpl;
private UriInfo uriInfo;
private ControllerContext controllerContext;
+ private RestconfImpl restconfImpl;
@BeforeClass
public static void init() throws FileNotFoundException {
public void setup() throws Exception {
MockitoAnnotations.initMocks(this);
- this.broker.setDomDataBroker(this.domDataBroker);
- RestconfImpl.getInstance().setBroker(this.broker);
-
controllerContext = TestRestconfUtils.newControllerContext(schemaContext);
- RestconfImpl.getInstance().setControllerContext(controllerContext);
+ restconfImpl = RestconfImpl.newInstance(broker, controllerContext);
final YangInstanceIdentifier path = Mockito.mock(YangInstanceIdentifier.class);
final PathArgument pathValue = NodeIdentifier.create(QName.create("module", "2016-12-14", "localName"));
set.add(entry);
}
Mockito.when(map.entrySet()).thenReturn(set);
- RestconfImpl.getInstance().subscribeToStream(this.identifier, this.uriInfo);
+ restconfImpl.subscribeToStream(this.identifier, this.uriInfo);
}
}