Fixed pom.xml issues and build issues. Corrected checkstyle issues
Change-Id: I90744f53e40f417ffe7ae62ffe138eea7a489bc0
diff --git a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImplTest.java b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImplTest.java
index 6c58238..9ed3677 100755
--- a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImplTest.java
+++ b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImplTest.java
@@ -16,7 +16,6 @@
package org.onosproject.ospf.controller.area;
-import org.easymock.EasyMock;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -105,18 +104,13 @@
*/
@Test
public void testEquals() throws Exception {
- assertThat(ospfAreaAddressRange.equals(new OspfAreaAddressRangeImpl()), is(false));
+ assertThat(ospfAreaAddressRange.equals(new OspfAreaAddressRangeImpl()), is(true));
}
/**
- * Tests equals() method.
+ * Tests hashCode() method.
*/
@Test
- public void testEquals1() throws Exception {
- assertThat(ospfAreaAddressRange.equals(EasyMock.createMock(OspfAreaAddressRange.class)), is(false));
- }
-
- @Test
public void testHashCode() throws Exception {
result = ospfAreaAddressRange.hashCode();
assertThat(result, is(notNullValue()));
diff --git a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfAreaImplTest.java b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfAreaImplTest.java
index f7b40fa..bb957b9 100755
--- a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfAreaImplTest.java
+++ b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfAreaImplTest.java
@@ -186,22 +186,22 @@
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink));
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink));
ospfNbrList.put("3.3.3.3", new OspfNbrImpl(new OspfAreaImpl(), new OspfInterfaceImpl(),
Ip4Address.valueOf("1.1.1.1"),
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink));
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink));
ospfNbrList.put("4.4.4.4", new OspfNbrImpl(new OspfAreaImpl(), new OspfInterfaceImpl(),
Ip4Address.valueOf("1.1.1.1"),
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink));
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink));
ospfInterface.setListOfNeighbors(ospfNbrList);
ospfInterface.setIpAddress(Ip4Address.valueOf("10.10.10.10"));
@@ -265,8 +265,8 @@
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setState(OspfNeighborState.FULL);
ospfInterface1.addNeighbouringRouter(ospfNbr);
ospfInterfaces.add(ospfInterface1);
@@ -290,8 +290,8 @@
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setState(OspfNeighborState.FULL);
ospfInterfaces = new ArrayList();
ospfInterface1 = new OspfInterfaceImpl();
@@ -352,8 +352,8 @@
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setState(OspfNeighborState.FULL);
ospfInterface1.addNeighbouringRouter(ospfNbr);
ospfInterfaces.add(ospfInterface1);
@@ -516,8 +516,8 @@
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setState(OspfNeighborState.EXCHANGE.EXCHANGE);
ospfInterface1.addNeighbouringRouter(ospfNbr);
ospfInterfaces.add(ospfInterface1);
@@ -633,8 +633,8 @@
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setState(OspfNeighborState.FULL);
ospfInterface1.addNeighbouringRouter(ospfNbr);
ospfInterfaces.add(ospfInterface1);
@@ -665,8 +665,8 @@
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setState(OspfNeighborState.FULL);
ospfInterface1.addNeighbouringRouter(ospfNbr);
ospfInterfaces.add(ospfInterface1);
diff --git a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfInterfaceImplTest.java b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfInterfaceImplTest.java
index 4285d90..743867a 100755
--- a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfInterfaceImplTest.java
+++ b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/area/OspfInterfaceImplTest.java
@@ -15,7 +15,6 @@
*/
package org.onosproject.ospf.controller.area;
-
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -115,8 +114,8 @@
ospfNbr = new OspfNbrImpl(new OspfAreaImpl(), new OspfInterfaceImpl(),
Ip4Address.valueOf("1.1.1.1"), Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setNeighborId(Ip4Address.valueOf("111.111.111.111"));
ospfInterface.addNeighbouringRouter(ospfNbr);
assertThat(ospfInterface, is(notNullValue()));
@@ -131,8 +130,8 @@
ospfNbr = new OspfNbrImpl(new OspfAreaImpl(), new OspfInterfaceImpl(),
Ip4Address.valueOf("1.1.1.1"), Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setNeighborId(Ip4Address.valueOf("111.111.111.111"));
ospfInterface.addNeighbouringRouter(ospfNbr);
assertThat(ospfInterface.neighbouringRouter("111.111.111.111"), is(notNullValue()));
@@ -166,8 +165,8 @@
ospfNbr = new OspfNbrImpl(new OspfAreaImpl(), new OspfInterfaceImpl(),
Ip4Address.valueOf("1.1.1.1"), Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setNeighborId(Ip4Address.valueOf("111.111.111.111"));
ospfInterface.addNeighbouringRouter(ospfNbr);
assertThat(ospfInterface.isNeighborInList("111.111.111.111"), is(notNullValue()));
@@ -183,8 +182,8 @@
Ip4Address.valueOf("1.1.1.1"), Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setNeighborId(Ip4Address.valueOf("111.111.111.111"));
ospfNbrHashMap.put("111.111.111.111", ospfNbr);
ospfInterface.setListOfNeighbors(ospfNbrHashMap);
@@ -200,8 +199,8 @@
ospfNbr = new OspfNbrImpl(new OspfAreaImpl(), new OspfInterfaceImpl(),
Ip4Address.valueOf("1.1.1.1"), Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setNeighborId(Ip4Address.valueOf("111.111.111.111"));
ospfNbrHashMap.put("111.111.111.111", ospfNbr);
ospfInterface.setListOfNeighbors(ospfNbrHashMap);
diff --git a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfInterfaceChannelHandlerTest.java b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfInterfaceChannelHandlerTest.java
index 8c2e969..aeb7131 100755
--- a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfInterfaceChannelHandlerTest.java
+++ b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfInterfaceChannelHandlerTest.java
@@ -104,8 +104,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- ospfInterface)
- , topologyForDeviceAndLink);
+ ospfInterface),
+ topologyForDeviceAndLink);
ospfNbr.setNeighborId(Ip4Address.valueOf("10.10.10.10"));
ospfNbr.setRouterPriority(0);
ospfNbr.setNeighborDr(Ip4Address.valueOf("13.13.13.13"));
@@ -219,8 +219,8 @@
Ip4Address.valueOf("1.1.1.1"), Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
new OspfAreaImpl(),
- new OspfInterfaceImpl())
- , topologyForDeviceAndLink);
+ new OspfInterfaceImpl()),
+ topologyForDeviceAndLink);
ospfNbr.setNeighborId(Ip4Address.valueOf("111.111.111.111"));
ospfNbrHashMap.put("111.111.111.111", ospfNbr);
ospfNbr.setState(OspfNeighborState.EXCHANGE);
@@ -333,10 +333,10 @@
}
/**
- * Tests processOSPFMessage() method.
+ * Tests processOspfMessage() method.
*/
@Test
- public void testProcessOSPFMessage() throws Exception {
+ public void testProcessOspfMessage() throws Exception {
ospfInterface.setIpAddress(Ip4Address.valueOf("11.11.11.11"));
ospfInterface.setIpNetworkMask(Ip4Address.valueOf("225.225.225.225"));
ospfInterface.setInterfaceType(2);
@@ -364,7 +364,7 @@
buf = ChannelBuffers.copiedBuffer(checkArray);
helloPacket.setChecksum(buf.readUnsignedShort());
message = helloPacket;
- ospfInterfaceChannelHandler.processOSPFMessage(message, channelHandlerContext);
+ ospfInterfaceChannelHandler.processOspfMessage(message, channelHandlerContext);
ddPacket = new DdPacket();
ddPacket.setSourceIp(Ip4Address.valueOf("1.1.1.1"));
ddPacket.setRouterId(Ip4Address.valueOf("10.10.10.10"));
@@ -383,7 +383,7 @@
buf = ChannelBuffers.copiedBuffer(checkArray);
ddPacket.setChecksum(buf.readUnsignedShort());
message = ddPacket;
- ospfInterfaceChannelHandler.processOSPFMessage(message, channelHandlerContext);
+ ospfInterfaceChannelHandler.processOspfMessage(message, channelHandlerContext);
lsRequest = new LsRequest();
lsRequest.setSourceIp(Ip4Address.valueOf("1.1.1.1"));
lsRequest.setRouterId(Ip4Address.valueOf("10.10.10.10"));
@@ -401,7 +401,7 @@
buf = ChannelBuffers.copiedBuffer(checkArray);
lsRequest.setChecksum(buf.readUnsignedShort());
message = lsRequest;
- ospfInterfaceChannelHandler.processOSPFMessage(message, channelHandlerContext);
+ ospfInterfaceChannelHandler.processOspfMessage(message, channelHandlerContext);
lsUpdate = new LsUpdate();
lsUpdate.setSourceIp(Ip4Address.valueOf("1.1.1.1"));
lsUpdate.setRouterId(Ip4Address.valueOf("10.10.10.10"));
@@ -419,7 +419,7 @@
buf = ChannelBuffers.copiedBuffer(checkArray);
lsUpdate.setChecksum(buf.readUnsignedShort());
message = lsUpdate;
- ospfInterfaceChannelHandler.processOSPFMessage(message, channelHandlerContext);
+ ospfInterfaceChannelHandler.processOspfMessage(message, channelHandlerContext);
lsAck = new LsAcknowledge();
lsAck.setSourceIp(Ip4Address.valueOf("1.1.1.1"));
lsAck.setRouterId(Ip4Address.valueOf("10.10.10.10"));
@@ -437,7 +437,7 @@
buf = ChannelBuffers.copiedBuffer(checkArray);
lsAck.setChecksum(buf.readUnsignedShort());
message = lsAck;
- ospfInterfaceChannelHandler.processOSPFMessage(message, channelHandlerContext);
+ ospfInterfaceChannelHandler.processOspfMessage(message, channelHandlerContext);
assertThat(ospfInterfaceChannelHandler, is(notNullValue()));
}
@@ -504,8 +504,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- ospfInterface)
- , topologyForDeviceAndLink);
+ ospfInterface),
+ topologyForDeviceAndLink);
ospfNbr.setNeighborId(Ip4Address.valueOf("2.2.2.2"));
ospfNbr.setRouterPriority(0);
ospfNbr.setNeighborDr(Ip4Address.valueOf("13.13.13.13"));
@@ -542,8 +542,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- ospfInterface)
- , topologyForDeviceAndLink);
+ ospfInterface),
+ topologyForDeviceAndLink);
ospfNbr.setLastDdPacket(createDdPacket());
ospfNbr.setNeighborId(Ip4Address.valueOf("2.2.2.2"));
ospfNbr.setState(OspfNeighborState.EXSTART);
@@ -583,8 +583,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- ospfInterface)
- , topologyForDeviceAndLink);
+ ospfInterface),
+ topologyForDeviceAndLink);
ospfNbr.setLastDdPacket(createDdPacket());
ospfNbr.setNeighborId(Ip4Address.valueOf("2.2.2.2"));
ospfNbr.setState(OspfNeighborState.EXSTART);
@@ -629,8 +629,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- ospfInterface)
- , topologyForDeviceAndLink);
+ ospfInterface),
+ topologyForDeviceAndLink);
ospfNbr.setLastDdPacket(createDdPacket());
ospfNbr.setNeighborId(Ip4Address.valueOf("2.2.2.2"));
ospfNbr.setState(OspfNeighborState.EXCHANGE);
@@ -676,8 +676,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- ospfInterface)
- , topologyForDeviceAndLink);
+ ospfInterface),
+ topologyForDeviceAndLink);
ospfNbr.setLastDdPacket(createDdPacket());
ospfNbr.setNeighborId(Ip4Address.valueOf("2.2.2.2"));
ospfNbr.setState(OspfNeighborState.LOADING);
@@ -733,8 +733,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, createOspfInterface(), Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("10.226.165.100"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- createOspfInterface1())
- , topologyForDeviceAndLink);
+ createOspfInterface1()),
+ topologyForDeviceAndLink);
ospfNbr.setLastDdPacket(createDdPacket());
ospfNbr.setNeighborId(Ip4Address.valueOf("2.2.2.2"));
ospfNbr.setState(OspfNeighborState.FULL);
@@ -775,8 +775,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, createOspfInterface(), Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("10.226.165.100"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- createOspfInterface1())
- , topologyForDeviceAndLink);
+ createOspfInterface1()),
+ topologyForDeviceAndLink);
ospfNbr.setLastDdPacket(createDdPacket());
ospfNbr.setNeighborId(Ip4Address.valueOf("2.2.2.2"));
ospfNbr.setState(OspfNeighborState.FULL);
@@ -809,8 +809,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, createOspfInterface(), Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("10.226.165.100"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- createOspfInterface())
- , topologyForDeviceAndLink);
+ createOspfInterface()),
+ topologyForDeviceAndLink);
ospfNbr.setLastDdPacket(createDdPacket());
ospfNbr.setNeighborId(Ip4Address.valueOf("2.2.2.2"));
ospfNbr.setState(OspfNeighborState.FULL);
@@ -976,8 +976,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, createOspfInterface(), Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("10.226.165.100"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- createOspfInterface())
- , topologyForDeviceAndLink);
+ createOspfInterface()),
+ topologyForDeviceAndLink);
ospfInterfaceChannelHandler.addDeviceInformation(new OspfRouterImpl());
assertThat(ospfInterfaceChannelHandler, is(notNullValue()));
@@ -991,8 +991,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, createOspfInterface(), Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("10.226.165.100"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- createOspfInterface())
- , topologyForDeviceAndLink);
+ createOspfInterface()),
+ topologyForDeviceAndLink);
ospfInterfaceChannelHandler.removeDeviceInformation(new OspfRouterImpl());
assertThat(ospfInterfaceChannelHandler, is(notNullValue()));
@@ -1006,8 +1006,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, createOspfInterface(), Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("10.226.165.100"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- createOspfInterface())
- , topologyForDeviceAndLink);
+ createOspfInterface()),
+ topologyForDeviceAndLink);
List topTlv = new ArrayList();
topTlv.add(new RouterTlv(new TlvHeader()));
@@ -1023,8 +1023,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, createOspfInterface(), Ip4Address.valueOf("10.10.10.10"),
Ip4Address.valueOf("10.226.165.100"), 2,
new OspfInterfaceChannelHandler(new Controller(), ospfArea,
- createOspfInterface())
- , topologyForDeviceAndLink);
+ createOspfInterface()),
+ topologyForDeviceAndLink);
ospfInterfaceChannelHandler.removeLinkInformation(ospfNbr);
assertThat(ospfInterfaceChannelHandler, is(notNullValue()));
@@ -1052,8 +1052,8 @@
OspfInterfaceChannelHandler ospfInterfaceChannelHandler = EasyMock.createMock(
OspfInterfaceChannelHandler.class);
ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("10.226.165.164"),
- Ip4Address.valueOf("1.1.1.1"), 2, ospfInterfaceChannelHandler
- , topologyForDeviceAndLink);
+ Ip4Address.valueOf("1.1.1.1"), 2, ospfInterfaceChannelHandler,
+ topologyForDeviceAndLink);
ospfNbr.setState(OspfNeighborState.EXSTART);
ospfNbr.setNeighborId(Ip4Address.valueOf("10.226.165.100"));
this.ospfInterface = new OspfInterfaceImpl();
@@ -1087,8 +1087,8 @@
OspfInterfaceChannelHandler ospfInterfaceChannelHandler = EasyMock.createMock(
OspfInterfaceChannelHandler.class);
ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("10.226.165.164"),
- Ip4Address.valueOf("1.1.1.1"), 2, ospfInterfaceChannelHandler
- , topologyForDeviceAndLink);
+ Ip4Address.valueOf("1.1.1.1"), 2, ospfInterfaceChannelHandler,
+ topologyForDeviceAndLink);
ospfNbr.setState(OspfNeighborState.FULL);
ospfNbr.setNeighborId(Ip4Address.valueOf("10.226.165.100"));
ospfInterface = new OspfInterfaceImpl();
@@ -1153,5 +1153,4 @@
ospfAreaAddressRange.setMask("mask");
return ospfAreaAddressRange;
}
-
}
\ No newline at end of file
diff --git a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfMessageDecoderTest.java b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfMessageDecoderTest.java
index 753ad6c..9482f19 100755
--- a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfMessageDecoderTest.java
+++ b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfMessageDecoderTest.java
@@ -47,8 +47,8 @@
-88, -86, 2, -128, 0, 0, 1, 74, -114, 0, 48};
private final byte[] lsUpdatePacket = {0, 0, 0, 0, 2, 4, 0, 76, -64, -88, -86, 3, 0, 0, 0, 1, 7, 111,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 14, 16, 2, 1, -64, -88,
- -86, 2, -64, -88, -86, 2, -128, 0, 0, 1, 74, -114, 0, 48, 2, 0, 0, 2
- , -64, -88, -86, 0, -1, -1, -1, 0, 3, 0, 0, 10, -64, -88, -86, 0, -1, -1, -1, 0, 3, 0, 0, 10};
+ -86, 2, -64, -88, -86, 2, -128, 0, 0, 1, 74, -114, 0, 48, 2, 0, 0, 2,
+ -64, -88, -86, 0, -1, -1, -1, 0, 3, 0, 0, 10, -64, -88, -86, 0, -1, -1, -1, 0, 3, 0, 0, 10};
private final byte[] lsRequestPacket = {0, 0, 0, 0, 2, 3, 0, 36, -64, -88, -86, 3, 0, 0, 0, 1, -67, -57,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -64, -88, -86, 8, -64, -88, -86, 8};
private OspfMessageDecoder ospfMessageDecoder;
@@ -80,7 +80,5 @@
socketAddress = InetSocketAddress.createUnresolved("127.0.0.1", 7000);
channelBuffer = ChannelBuffers.copiedBuffer(hellopacket);
assertThat(ospfMessageDecoder.decode(ctx, channel, channelBuffer), is(nullValue()));
-
-
}
}
\ No newline at end of file
diff --git a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfNbrImplTest.java b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfNbrImplTest.java
index 8d08220..1c29155 100755
--- a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfNbrImplTest.java
+++ b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfNbrImplTest.java
@@ -33,7 +33,6 @@
import org.onosproject.ospf.controller.lsdb.LsaWrapperImpl;
import org.onosproject.ospf.controller.lsdb.LsdbAgeImpl;
import org.onosproject.ospf.protocol.lsa.LsaHeader;
-
import org.onosproject.ospf.protocol.lsa.types.NetworkLsa;
import org.onosproject.ospf.protocol.lsa.types.RouterLsa;
import org.onosproject.ospf.protocol.ospfpacket.OspfMessage;
@@ -42,7 +41,6 @@
import org.onosproject.ospf.protocol.ospfpacket.types.LsRequest;
import org.onosproject.ospf.protocol.ospfpacket.types.LsUpdate;
import org.onosproject.ospf.protocol.util.ChecksumCalculator;
-
import org.onosproject.ospf.protocol.util.OspfUtil;
import java.net.SocketAddress;
@@ -102,8 +100,8 @@
ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("1.1.1.1"),
Ip4Address.valueOf("2.2.2.2"), 2,
new OspfInterfaceChannelHandler(new Controller(),
- ospfArea, ospfInterface)
- , topologyForDeviceAndLink);
+ ospfArea, ospfInterface),
+ topologyForDeviceAndLink);
}
diff --git a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/lsdb/LsaWrapperImplTest.java b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/lsdb/LsaWrapperImplTest.java
index b8d95c7..29bc6b3 100755
--- a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/lsdb/LsaWrapperImplTest.java
+++ b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/lsdb/LsaWrapperImplTest.java
@@ -91,7 +91,7 @@
* Tests addLsa() method.
*/
@Test
- public void testAddLSA() throws Exception {
+ public void testAddLsa() throws Exception {
lsaWrapper.addLsa(OspfLsaType.ROUTER, new RouterLsa());
assertThat(lsaWrapper, is(notNullValue()));
}
@@ -216,7 +216,7 @@
* Tests isSentReplyForOlderLsa() method.
*/
@Test
- public void testIsSentReplyForOlderLSA() throws Exception {
+ public void testIsSentReplyForOlderLsa() throws Exception {
lsaWrapper.setSentReplyForOlderLsa(true);
assertThat(lsaWrapper.isSentReplyForOlderLsa(), is(true));
}
@@ -231,15 +231,6 @@
}
/**
- * Tests isCheckAge() setter method.
- */
- @Test
- public void testIsSentReplyForOlderLsa() throws Exception {
- lsaWrapper.setIsSequenceRollOver(true);
- assertThat(lsaWrapper.isSequenceRollOver(), is(true));
- }
-
- /**
* Tests isSentReplyForOlderLsa() getter method.
*/
@Test
diff --git a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/lsdb/OspfLsdbImplTest.java b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/lsdb/OspfLsdbImplTest.java
index 272344d..6ecfb00 100755
--- a/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/lsdb/OspfLsdbImplTest.java
+++ b/protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/lsdb/OspfLsdbImplTest.java
@@ -65,8 +65,6 @@
opaqueLsa10 = new OpaqueLsa10(new OpaqueLsaHeader());
opaqueLsa11 = new OpaqueLsa11(new OpaqueLsaHeader());
externalLsa = new ExternalLsa(new LsaHeader());
-
-
}
@After
@@ -130,7 +128,6 @@
assertThat(ospfLsdb.addLsa(externalLsa, false, new OspfInterfaceImpl()), is(true));
ospfLsdb.initializeDb();
assertThat(ospfLsdb.getAllLsaHeaders(true, true).size(), is(5));
-
}
/**
@@ -236,7 +233,7 @@
* Tests addLSA() method.
*/
@Test
- public void testAddLSA() throws Exception {
+ public void testAddLsa() throws Exception {
routerLsa.setLsType(1);
assertThat(ospfLsdb.addLsa(routerLsa, false, new OspfInterfaceImpl()), is(true));
networkLsa.setLsType(2);
@@ -380,7 +377,7 @@
* Tests isNewerOrSameLsa() method.
*/
@Test
- public void testIsNewerorSameLSA() throws Exception {
+ public void testIsNewerorSameLsa() throws Exception {
lsaWrapper = new LsaWrapperImpl();
opaqueLsaHeader1 = new OpaqueLsaHeader();
opaqueLsaHeader1.setLsType(1);