Remove trailing whitespace
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / core / connection / UdpMessageListenerWrapperTest.java
1 /*
2  * Copyright (c) 2014 Pantheon Technologies s.r.o. 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.openflowjava.protocol.impl.core.connection;
10
11 import io.netty.util.concurrent.Future;
12 import io.netty.util.concurrent.GenericFutureListener;
13
14 import java.net.InetSocketAddress;
15
16 import org.junit.Assert;
17 import org.junit.Before;
18 import org.junit.Test;
19 import org.mockito.Mock;
20 import org.mockito.MockitoAnnotations;
21 import org.opendaylight.openflowjava.protocol.impl.core.connection.UdpMessageListenerWrapper;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
23
24 /**
25  *
26  * @author madamjak
27  *
28  */
29 public class UdpMessageListenerWrapperTest {
30
31     @Mock GenericFutureListener<Future<Void>> listener;
32     @Mock OfHeader msg;
33
34     @Before
35     public void startUp(){
36         MockitoAnnotations.initMocks(this);
37     }
38     /**
39      * Getters test
40      */
41     @Test
42     public void test(){
43         int port = 9876;
44         String host ="localhost";
45         InetSocketAddress inetSockAddr = InetSocketAddress.createUnresolved(host, port);
46         UdpMessageListenerWrapper wrapper = new UdpMessageListenerWrapper(msg,listener,inetSockAddr);
47
48         Assert.assertEquals("Wrong getAddress", inetSockAddr, wrapper.getAddress());
49         Assert.assertEquals("Wrong getListener", listener, wrapper.getListener());
50         Assert.assertEquals("Wrong getMsg", msg, wrapper.getMsg());
51     }
52
53 }