Bump upstreams
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / services / EchoServiceTest.java
index 3e453b7bad52c3b33f567265107e36f5842b2158..6eaec2b7be2569cfb2623d6e561acbb1650ba9f4 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.openflowplugin.impl.services;
 
 import static org.junit.Assert.assertArrayEquals;
@@ -11,10 +18,11 @@ import org.opendaylight.openflowplugin.api.openflow.device.Xid;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
+import org.opendaylight.yangtools.yang.common.Uint32;
 
 public class EchoServiceTest extends ServiceMocking {
 
-    private static final Long DUMMY_XID_VALUE = 100L;
+    private static final Uint32 DUMMY_XID_VALUE = Uint32.valueOf(100);
     private static final byte[] DUMMY_DATA = "DUMMY DATA".getBytes();
     EchoService echoService;
 
@@ -24,20 +32,20 @@ public class EchoServiceTest extends ServiceMocking {
     }
 
     @Test
-    public void testSendEcho() throws Exception {
+    public void testSendEcho() {
         EchoInputBuilder sendEchoInput = new EchoInputBuilder();
         echoService.handleServiceCall(sendEchoInput);
         verify(mockedRequestContextStack).createRequestContext();
     }
 
     @Test
-    public void testBuildRequest() throws Exception {
+    public void testBuildRequest() {
         EchoInputBuilder sendEchoInput = new EchoInputBuilder().setData(DUMMY_DATA);
         final OfHeader request = this.echoService.buildRequest(new Xid(DUMMY_XID_VALUE), sendEchoInput);
         assertEquals(DUMMY_XID_VALUE, request.getXid());
         assertTrue(request instanceof EchoInput);
         final byte[] data = ((EchoInput) request).getData();
         assertArrayEquals(DUMMY_DATA, data);
-        assertEquals(OFConstants.OFP_VERSION_1_3, request.getVersion().shortValue());
+        assertEquals(OFConstants.OFP_VERSION_1_3, request.getVersion());
     }
-}
\ No newline at end of file
+}