summaryrefslogtreecommitdiffstats
path: root/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-06-14 12:12:42 +0200
committerMarek Gradzki <mgradzki@cisco.com>2018-06-14 10:18:24 +0000
commit41e130b7f5d0aaf32c57c7b66ea6751adb219ba5 (patch)
treefb290521aa7ef3e6c8103337c483f0fe663e344a /l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java
parenta5ed4b176e17675f6fd3319b33e8b6a96b2b2307 (diff)
l3: remove redundant stubbing for WriteContext.readBefore
Change-Id: I8c4cc2564ad0f4c6452984234d4c9466677db052 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java')
-rw-r--r--l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java7
1 files changed, 0 insertions, 7 deletions
diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java
index 850c1baeb..efab72bb1 100644
--- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java
+++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java
@@ -22,9 +22,7 @@ import static org.mockito.Matchers.any;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.honeycomb.translate.write.WriteFailedException;
@@ -95,7 +93,6 @@ public class Ipv4AddressCustomizerTest extends WriterCustomizerTest {
@Test
public void testAddPrefixLengthIpv4Address() throws Exception {
final InstanceIdentifier<Address> id = getAddressId(IFACE_NAME);
- when(writeContext.readBefore(id)).thenReturn(Optional.absent());
Ipv4AddressNoZone noZoneIp = new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"));
PrefixLength length = new PrefixLengthBuilder().setPrefixLength(new Integer(24).shortValue()).build();
@@ -113,7 +110,6 @@ public class Ipv4AddressCustomizerTest extends WriterCustomizerTest {
@Test
public void testAddPrefixLengthIpv4AddressFailed() throws Exception {
final InstanceIdentifier<Address> id = getAddressId(IFACE_NAME);
- when(writeContext.readBefore(id)).thenReturn(Optional.absent());
Ipv4AddressNoZone noZoneIp = new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"));
PrefixLength length = new PrefixLengthBuilder().setPrefixLength(new Integer(24).shortValue()).build();
@@ -197,7 +193,6 @@ public class Ipv4AddressCustomizerTest extends WriterCustomizerTest {
final int expectedPrefixLength = 1;
final String stringMask = "128.0.0.0";
final InstanceIdentifier<Address> id = getAddressId(IFACE_NAME);
- when(writeContext.readBefore(id)).thenReturn(Optional.absent());
Ipv4AddressNoZone noZoneIp = new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"));
Netmask subnet = new NetmaskBuilder().setNetmask(new DottedQuad(stringMask)).build();
@@ -220,7 +215,6 @@ public class Ipv4AddressCustomizerTest extends WriterCustomizerTest {
private void testSingleNetmask(final int expectedPrefixLength, final String stringMask) throws Exception {
final InstanceIdentifier<Address> id = getAddressId(IFACE_NAME);
- when(writeContext.readBefore(id)).thenReturn(Optional.absent());
Ipv4AddressNoZone noZoneIp = new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"));
Netmask subnet = new NetmaskBuilder().setNetmask(new DottedQuad(stringMask)).build();
@@ -238,7 +232,6 @@ public class Ipv4AddressCustomizerTest extends WriterCustomizerTest {
private void testSingleIllegalNetmask(final String stringMask) throws Exception {
try {
final InstanceIdentifier<Address> id = getAddressId(IFACE_NAME);
- when(writeContext.readBefore(id)).thenReturn(Optional.absent());
Ipv4AddressNoZone noZoneIp = new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"));
Netmask subnet = new NetmaskBuilder().setNetmask(new DottedQuad(stringMask)).build();