### Question:
IngressNatMapperFlows { void createIngressExternalArpFlows(short goToTable, Endpoint endpoint, OrdinalFactory.EndpointFwdCtxOrdinals endpointFwdCtxOrdinals, int priority, OfWriter ofWriter) { if (endpoint.getMacAddress() != null) { Flow arpFlow = buildIngressExternalArpFlow(goToTable, endpoint.getMacAddress(), priority, endpointFwdCtxOrdinals); if (arpFlow != null) { ofWriter.writeFlow(nodeId, tableId, arpFlow); } } } IngressNatMapperFlows(NodeId nodeId, short tableId);   }### Answer:
@Test public void testIngressExternalArpFlow() throws Exception { Endpoint testEndpoint = buildEndpoint(IPV4_0, MAC_0, CONNECTOR_0).build(); when(ctx.getEndpointManager()).thenReturn(endpointManager); when(ctx.getTenant(Mockito.any(TenantId.class))).thenReturn(getTestIndexedTenant()); when(ctx.getCurrentPolicy()).thenReturn(policyInfo); OrdinalFactory.EndpointFwdCtxOrdinals ordinals = OrdinalFactory.getEndpointFwdCtxOrdinals(ctx, testEndpoint); InOrder order = inOrder(ctx); order.verify(ctx, times(1)).getEndpointManager(); order.verify(ctx, times(1)).getCurrentPolicy(); verify(ctx, times(3)).getTenant(TENANT_ID); assertNotNull(ordinals); List<Instruction> instructions = new ArrayList<>(); Action[] ordinalsAction = {FlowUtils.nxLoadRegAction(NxmNxReg0.class, BigInteger.valueOf(1)), FlowUtils.nxLoadRegAction(NxmNxReg1.class, BigInteger.valueOf(0)), FlowUtils.nxLoadRegAction(NxmNxReg4.class, BigInteger.valueOf(3)), FlowUtils.nxLoadRegAction(NxmNxReg5.class, BigInteger.valueOf(4)), FlowUtils.nxLoadRegAction(NxmNxReg6.class, BigInteger.valueOf(5)), FlowUtils.nxLoadTunIdAction(BigInteger.valueOf(ordinals.getTunnelId()), false)}; instructions.add(new InstructionBuilder().setOrder(0) .setInstruction(FlowUtils.applyActionIns(ArrayUtils.addAll(ordinalsAction))).build()); instructions.add(new InstructionBuilder().setOrder(1).setInstruction(FlowUtils.gotoTableIns((short) 0)).build()); InstructionsBuilder instructionsBuilder = new InstructionsBuilder(); instructionsBuilder.setInstruction(instructions); MatchBuilder matchBuilder = new MatchBuilder(); matchBuilder.setEthernetMatch(FlowUtils.ethernetMatch(new MacAddress(MAC_0), null, FlowUtils.ARP)); Match match = matchBuilder.build(); Flow testFlow = buildFlow(FlowIdUtils.newFlowId(tableId, "inbound-external-arp", match), tableId, 30, match, instructionsBuilder.build()).build(); flows.createIngressExternalArpFlows((short) 0, testEndpoint, ordinals, 30, ofWriter); verify(ofWriter, times(1)).writeFlow(NODE_ID, tableId, testFlow); }