95a33047a07d82a82e8220af4e7e246008783f51
[unimgr.git] / impl / src / test / java / org / opendaylight / unimgr / impl / UnimgrProviderTest.java
1 /*
2  * Copyright (c) 2015 CableLabs 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 package org.opendaylight.unimgr.impl;
9
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;
18
19
20 @RunWith(PowerMockRunner.class)
21 @PrepareForTest({FrameworkUtil.class})
22 public class UnimgrProviderTest {
23
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;
29
30     @Test
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));
40 //        provider.close();
41     }
42 }