2 * Copyright (c) 2016 Cisco Systems, Inc. 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.lispflowmapping.neutron;
10 import static org.junit.Assert.assertEquals;
12 import org.junit.Test;
13 import org.mockito.Mockito;
14 import org.opendaylight.lispflowmapping.interfaces.lisp.IFlowMapping;
15 import org.opendaylight.mdsal.binding.api.DataBroker;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.OdlMappingserviceService;
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);
23 private final LispNeutronService lispNeutronService =
24 new LispNeutronService(mappingService, dataBroker, odlMappingService);
27 * Tests {@link LispNeutronService#Init} method.
30 public void onInit() {
31 lispNeutronService.init();
35 * Tests {@link LispNeutronService#close} method.
38 public void closeTest() {
39 lispNeutronService.close();
40 assertEquals(null, lispNeutronService.getMappingService());