ArpSender { public ListenableFuture<RpcResult<Void>> floodArp(ArpMessageAddress senderAddress, Ipv4Address tpa, InstanceIdentifier<Node> nodeIid) { checkNotNull(senderAddress); checkNotNull(tpa); checkNotNull(nodeIid); NodeConnectorKey nodeConnectorKey = new NodeConnectorKey( createNodeConnectorId(OFPP_ALL, nodeIid.firstKeyOf(Node.class, NodeKey.class).getId())); InstanceIdentifier<NodeConnector> egressNc = nodeIid.child(NodeConnector.class, nodeConnectorKey); return sendArp(senderAddress, tpa, egressNc); } ArpSender(PacketProcessingService packetProcessingService); ListenableFuture<RpcResult<Void>> floodArp(ArpMessageAddress senderAddress, Ipv4Address tpa,
			InstanceIdentifier<Node> nodeIid); ListenableFuture<RpcResult<Void>> sendArp(ArpMessageAddress senderAddress, Ipv4Address tpa,
			InstanceIdentifier<NodeConnector> egressNc); ListenableFuture<RpcResult<Void>> sendArpResponse(ArpMessageAddress senderAddress,
			ArpMessageAddress receiverAddress, InstanceIdentifier<NodeConnector> egressNc, Header8021q vlan);  }
@Test public void testFloodArp() { Ipv4Address srcIpv4Address = Ipv4Address.getDefaultInstance("192.168.10.1"); Ipv4Address dstIpv4Address = Ipv4Address.getDefaultInstance("192.168.20.1"); MacAddress macAddress = new MacAddress("aa:bb:cc:dd:ee:ff"); ArpMessageAddress senderAddress = new ArpMessageAddress(macAddress, srcIpv4Address); InstanceIdentifier<Node> instanceId = InstanceIdentifier.builder(Nodes.class) .child(Node.class, new NodeKey(new NodeId("node_001"))).toInstance(); Future<RpcResult<Void>> futureTransmitPacketResult = mock(Future.class); when(packetProcessingService.transmitPacket(any(TransmitPacketInput.class))) .thenReturn(futureTransmitPacketResult); arpSender.floodArp(senderAddress, dstIpv4Address, instanceId); verify(packetProcessingService, times(1)).transmitPacket(any(TransmitPacketInput.class)); }