2 * Copyright (c) 2014 Pantheon Technologies s.r.o. 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
9 package org.opendaylight.openflowjava.protocol.impl.connection;
11 import io.netty.util.concurrent.Future;
12 import io.netty.util.concurrent.GenericFutureListener;
13 import java.net.InetSocketAddress;
14 import org.junit.Assert;
15 import org.junit.Before;
16 import org.junit.Test;
17 import org.mockito.Mock;
18 import org.mockito.MockitoAnnotations;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
26 public class UdpMessageListenerWrapperTest {
28 @Mock GenericFutureListener<Future<Void>> listener;
32 public void startUp(){
33 MockitoAnnotations.initMocks(this);
41 String host ="localhost";
42 InetSocketAddress inetSockAddr = InetSocketAddress.createUnresolved(host, port);
43 UdpMessageListenerWrapper wrapper = new UdpMessageListenerWrapper(msg,listener,inetSockAddr);
45 Assert.assertEquals("Wrong getAddress", inetSockAddr, wrapper.getAddress());
46 Assert.assertEquals("Wrong getListener", listener, wrapper.getListener());
47 Assert.assertEquals("Wrong getMsg", msg, wrapper.getMsg());