Resolve Bug:745 - remove windows line endings from config and netconf.
[controller.git] / opendaylight / config / threadpool-config-impl / src / test / java / org / opendaylight / controller / config / threadpool / eventbus / TestingEventBusModule.java
1 /*
2  * Copyright (c) 2013 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.controller.config.threadpool.eventbus;
9
10 import static org.mockito.Mockito.doNothing;
11 import static org.mockito.Mockito.mock;
12
13 import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
14 import org.opendaylight.controller.config.api.ModuleIdentifier;
15 import org.opendaylight.controller.config.manager.impl.AbstractMockedModule;
16 import org.opendaylight.controller.config.spi.Module;
17 import org.opendaylight.controller.config.threadpool.util.CloseableEventBus;
18 import org.opendaylight.controller.config.yang.threadpool.EventBusServiceInterface;
19 import org.opendaylight.controller.config.yang.threadpool.impl.EventBusModuleMXBean;
20
21 public class TestingEventBusModule extends AbstractMockedModule implements Module, EventBusServiceInterface,
22         EventBusModuleMXBean {
23
24     public TestingEventBusModule(DynamicMBeanWithInstance old, ModuleIdentifier id) {
25         super(old, id);
26     }
27
28     @Override
29     protected AutoCloseable prepareMockedInstance() throws Exception {
30         CloseableEventBus bus = mock(CloseableEventBus.class);
31         doNothing().when(bus).close();
32         return bus;
33     }
34
35 }