Remove uses of BindingAwareProvider
[lispflowmapping.git] / mappingservice / neutron / src / test / java / org / opendaylight / lispflowmapping / neutron / LispNeutronServiceTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. 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.lispflowmapping.neutron;
9
10 import static org.junit.Assert.assertEquals;
11
12 import org.junit.Test;
13 import org.mockito.Mockito;
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.lispflowmapping.interfaces.lisp.IFlowMapping;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.OdlMappingserviceService;
17
18 public class LispNeutronServiceTest {
19     private static OdlMappingserviceService odlMappingService = Mockito.mock(OdlMappingserviceService.class);
20     private static DataBroker dataBroker = Mockito.mock(DataBroker.class);
21     private final IFlowMapping mappingService = Mockito.mock(IFlowMapping.class);
22
23     private final LispNeutronService lispNeutronService =
24             new LispNeutronService(mappingService, dataBroker, odlMappingService);
25
26     /**
27      * Tests {@link LispNeutronService#Init} method.
28      */
29     @Test
30     public void onInit() {
31         lispNeutronService.init();
32     }
33
34     /**
35      * Tests {@link LispNeutronService#close} method.
36      */
37     @Test
38     public void closeTest() {
39         lispNeutronService.close();
40         assertEquals(null, lispNeutronService.getMappingService());
41     }
42 }