}
/**
- * Test method {@link L3ForwardingService#programForwardingTableEntry(Node, Long, String, InetAddress, String, Action)}
+ * Test method {@link L3ForwardingService#programForwardingTableEntry(Long, String, InetAddress, String, Action)}
*/
@Test
public void testProgramForwardingTableEntry() throws Exception {
InetAddress address = mock(InetAddress.class);
when(address.getHostAddress()).thenReturn(HOST_ADDRESS);
- assertEquals("Error, did not return the expected StatusCode", new Status(StatusCode.SUCCESS), l3ForwardingService.programForwardingTableEntry(mock(Node.class), Long.valueOf(123), SEGMENTATION_ID, address, MAC_ADDRESS, Action.ADD));
- verify(readWriteTransaction, times(2)).put(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), any(Node.class), anyBoolean());
+ assertEquals("Error, did not return the expected StatusCode",
+ new Status(StatusCode.SUCCESS),
+ l3ForwardingService.programForwardingTableEntry(Long.valueOf(123),
+ SEGMENTATION_ID, address, MAC_ADDRESS, Action.ADD));
+ verify(readWriteTransaction, times(2)).put(any(LogicalDatastoreType.class),
+ any(InstanceIdentifier.class), any(Node.class), anyBoolean());
verify(readWriteTransaction, times(1)).submit();
verify(commitFuture, times(1)).get();
- assertEquals("Error, did not return the expected StatusCode", new Status(StatusCode.SUCCESS), l3ForwardingService.programForwardingTableEntry(mock(Node.class), Long.valueOf(123), SEGMENTATION_ID, address, MAC_ADDRESS, Action.DELETE));
+ assertEquals("Error, did not return the expected StatusCode",
+ new Status(StatusCode.SUCCESS),
+ l3ForwardingService.programForwardingTableEntry(Long.valueOf(123),
+ SEGMENTATION_ID, address, MAC_ADDRESS, Action.DELETE));
verify(writeTransaction, times(1)).delete(any(LogicalDatastoreType.class), any(InstanceIdentifier.class));
verify(readWriteTransaction, times(1)).submit();
verify(commitFuture, times(2)).get(); // 1 + 1 above