Merge "Bug 6088 - Threads problem on gathering statistics"
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / rpc / AbstractRequestContextTest.java
1 /*
2  * Copyright (c) 2015 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
9 package org.opendaylight.openflowplugin.impl.rpc;
10
11 import static org.junit.Assert.assertNotNull;
12
13 import java.util.concurrent.Future;
14 import org.junit.Before;
15 import org.junit.Test;
16 import org.junit.runner.RunWith;
17 import org.mockito.runners.MockitoJUnitRunner;
18
19 @RunWith(MockitoJUnitRunner.class)
20 public class AbstractRequestContextTest {
21     private AbstractRequestContext<Object> requestContext;
22
23     @Before
24     public void setup() {
25         requestContext = new AbstractRequestContext<Object>(1L) {
26             @Override
27             public void close() {
28                 // No-op
29             }
30         };
31     }
32
33     @Test
34     public void testCreateRequestFuture() throws Exception {
35         Future<?> future = requestContext.getFuture();
36         assertNotNull(future);
37     }
38 }