OPNFLWPLUG-972 : Move liblldp from controller to openflowplugin
[controller.git] / opendaylight / commons / liblldp / src / test / java / org / opendaylight / controller / sal / packet / address / EthernetAddressTest.java
diff --git a/opendaylight/commons/liblldp/src/test/java/org/opendaylight/controller/sal/packet/address/EthernetAddressTest.java b/opendaylight/commons/liblldp/src/test/java/org/opendaylight/controller/sal/packet/address/EthernetAddressTest.java
deleted file mode 100644 (file)
index 5730dc7..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2014, 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
- */
-
-/**
- * @file   EthernetAddressTest.java
- *
- * @brief  Unit Tests for EthernetAddress class
- *
- * Unit Tests for EthernetAddress class
- */
-package org.opendaylight.controller.sal.packet.address;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.opendaylight.controller.liblldp.ConstructionException;
-import org.opendaylight.controller.liblldp.EthernetAddress;
-
-public class EthernetAddressTest {
-    @Test
-    public void testNonValidConstructor() {
-        @SuppressWarnings("unused")
-        EthernetAddress ea1;
-        // Null input array
-        try {
-            ea1 = new EthernetAddress((byte[]) null);
-
-            // Exception is expected if NOT raised test will fail
-            Assert.assertTrue(false);
-        } catch (final ConstructionException e) {
-        }
-
-        // Array too short
-        try {
-            ea1 = new EthernetAddress(new byte[] { (byte) 0x0, (byte) 0x0 });
-
-            // Exception is expected if NOT raised test will fail
-            Assert.assertTrue(false);
-        } catch (final ConstructionException e) {
-        }
-
-        // Array too long
-        try {
-            ea1 = new EthernetAddress(new byte[] { (byte) 0x0, (byte) 0x0,
-                    (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x0,
-                    (byte) 0x0 });
-
-            // Exception is expected if NOT raised test will fail
-            Assert.assertTrue(false);
-        } catch (final ConstructionException e) {
-        }
-    }
-
-    @Test
-    public void testEquality() {
-        EthernetAddress ea1;
-        EthernetAddress ea2;
-        try {
-            ea1 = new EthernetAddress(new byte[] { (byte) 0x0, (byte) 0x0,
-                    (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x1 });
-
-            ea2 = new EthernetAddress(new byte[] { (byte) 0x0, (byte) 0x0,
-                    (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x1 });
-            Assert.assertTrue(ea1.equals(ea2));
-        } catch (final ConstructionException e) {
-            // Exception is NOT expected if raised test will fail
-            Assert.assertTrue(false);
-        }
-
-        try {
-            ea1 = new EthernetAddress(new byte[] { (byte) 0x0, (byte) 0x0,
-                    (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x1 });
-
-            ea2 = ea1.clone();
-            Assert.assertTrue(ea1.equals(ea2));
-        } catch (final ConstructionException e) {
-            // Exception is NOT expected if raised test will fail
-            Assert.assertTrue(false);
-        }
-
-        // Check for well knowns
-        try {
-            ea1 = EthernetAddress.BROADCASTMAC;
-            ea2 = new EthernetAddress(new byte[] { (byte) 0xff, (byte) 0xff,
-                    (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff });
-            Assert.assertTrue(ea1.equals(ea2));
-        } catch (final ConstructionException e) {
-            // Exception is NOT expected if raised test will fail
-            Assert.assertTrue(false);
-        }
-    }
-
-    @Test
-    public void testUnEquality() {
-        EthernetAddress ea1;
-        EthernetAddress ea2;
-        try {
-            ea1 = new EthernetAddress(new byte[] { (byte) 0x0, (byte) 0x0,
-                    (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x2 });
-
-            ea2 = new EthernetAddress(new byte[] { (byte) 0x0, (byte) 0x0,
-                    (byte) 0x0, (byte) 0x0, (byte) 0x0, (byte) 0x1 });
-            Assert.assertTrue(!ea1.equals(ea2));
-        } catch (final ConstructionException e) {
-            // Exception is NOT expected if raised test will fail
-            Assert.assertTrue(false);
-        }
-    }
-}