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.core;
11 import io.netty.buffer.ByteBuf;
12 import java.net.InetSocketAddress;
13 import org.junit.Before;
14 import org.junit.Test;
15 import org.junit.Assert;
16 import org.mockito.Mock;
17 import org.mockito.MockitoAnnotations;
25 public class VersionMessageUdpWrapperTest {
27 @Mock ByteBuf byteBuff;
29 public void startUp(){
30 MockitoAnnotations.initMocks(this);
37 String host ="localhost";
38 InetSocketAddress inetSockAddr = InetSocketAddress.createUnresolved(host, port);
39 VersionMessageUdpWrapper wrapper = new VersionMessageUdpWrapper(version,byteBuff,inetSockAddr);
41 Assert.assertEquals("Wrong getAddress", inetSockAddr, wrapper.getAddress());
42 Assert.assertEquals("Wrong getVersion", version, wrapper.getVersion());
43 Assert.assertEquals("Wrong getVersion", byteBuff, wrapper.getMessageBuffer());