2 * Copyright (c) 2015 CableLabs and others. All rights reserved.
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
8 package org.opendaylight.unimgr.impl;
10 import org.junit.Test;
11 import org.junit.runner.RunWith;
12 import org.mockito.Mock;
13 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
14 import org.opendaylight.unimgr.command.TransactionInvoker;
15 import org.osgi.framework.FrameworkUtil;
16 import org.powermock.core.classloader.annotations.PrepareForTest;
17 import org.powermock.modules.junit4.PowerMockRunner;
20 @RunWith(PowerMockRunner.class)
21 @PrepareForTest({FrameworkUtil.class})
22 public class UnimgrProviderTest {
24 @Mock private UniDataChangeListener unimgrDataChangeListener;
25 @Mock private EvcDataChangeListener evcDataChangeListener;
26 @Mock private UnimgrDataChangeListener listener;
27 @Mock private TransactionInvoker invoker;
28 @Mock private DataBroker dataBroker;
31 public void testClose() throws Exception {
32 // PowerMockito.mockStatic(FrameworkUtil.class);
33 // BundleContext context = mock(BundleContext.class);
34 // //ServiceRegistration registration = mock(ServiceRegistration.class);
35 // VcpeProvider provider = new VcpeProvider();
36 // Bundle bundle = mock(Bundle.class);
37 // PowerMockito.when(FrameworkUtil.getBundle(any(Class.class))).thenReturn(bundle);
38 // when(bundle.getBundleContext()).thenReturn(context);
39 // provider.onSessionInitiated(mock(BindingAwareBroker.ProviderContext.class));