package org.opendaylight.protocol.bgp.parser.impl.message.update;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
import com.google.common.collect.Lists;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.util.List;
-import junit.framework.TestCase;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.attributes.ClusterIdBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.ClusterIdentifier;
-public class ClusterIdAttributeParserTest extends TestCase {
+public class ClusterIdAttributeParserTest {
private static final byte[] clusterIdBytes = {(byte) 0x80, (byte) 0x0A, (byte) 0x08,
(byte) 0xC0, (byte) 0xA8, (byte) 0x1, (byte) 0x1,
(byte) 0xC0, (byte) 0xA8, (byte) 0x1, (byte) 0x2};
final ByteBuf output = Unpooled.buffer();
this.parser.serializeAttribute(clusterId, output);
- Assert.assertArrayEquals(clusterIdBytes, ByteArray.getAllBytes(output));
+ assertArrayEquals(clusterIdBytes, ByteArray.getAllBytes(output));
AttributesBuilder clusterIdOutput = new AttributesBuilder();
this.parser.parseAttribute(Unpooled.wrappedBuffer(ByteArray.cutBytes(clusterIdBytes, 3)), clusterIdOutput);
package org.opendaylight.protocol.bgp.parser.impl.message.update;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
import com.google.common.collect.Lists;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.util.List;
-import junit.framework.TestCase;
-import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.protocol.bgp.parser.spi.pojo.ServiceLoaderBGPExtensionProviderContext;
import org.opendaylight.protocol.util.ByteArray;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.AttributesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.attributes.Communities;
-public class CommunitiesAttributeParserTest extends TestCase {
+public class CommunitiesAttributeParserTest {
private static final byte[] CommunitiesBytes = {(byte) 0xC0, (byte) 0x08, (byte) 0x10,
(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0x1,
final ByteBuf actual = Unpooled.buffer();
ServiceLoaderBGPExtensionProviderContext.getSingletonInstance().getAttributeRegistry()
.serializeAttribute(paBuilder.build(), actual);
- Assert.assertArrayEquals(CommunitiesBytes, ByteArray.getAllBytes(actual));
+ assertArrayEquals(CommunitiesBytes, ByteArray.getAllBytes(actual));
final Attributes attributeOut = ServiceLoaderBGPExtensionProviderContext.getSingletonInstance().getAttributeRegistry()
.parseAttributes(actual);
- assertEquals(comms,attributeOut.getCommunities());
+ assertEquals(comms, attributeOut.getCommunities());
}
@Test