AclServiceOFFlowBuilder { @Nullable public static Map<String, List<MatchInfoBase>> programIpFlow(Matches matches) { if (matches != null) { AceIp acl = (AceIp) matches.getAceType(); Short protocol = acl.getProtocol() != null ? acl.getProtocol().toJava() : null; if (protocol == null) { return programEtherFlow(acl); } else if (acl.getProtocol().intValue() == NwConstants.IP_PROT_TCP) { return programTcpFlow(acl); } else if (acl.getProtocol().intValue() == NwConstants.IP_PROT_UDP) { return programUdpFlow(acl); } else if (acl.getProtocol().intValue() == NwConstants.IP_PROT_ICMP) { return programIcmpFlow(acl); } else if (acl.getProtocol().intValue() != -1) { return programOtherProtocolFlow(acl); } } return null; } private  AclServiceOFFlowBuilder(); @Nullable static Map<String, List<MatchInfoBase>> programIpFlow(Matches matches); static Map<String,List<MatchInfoBase>> programEtherFlow(AceIp acl); static Map<String,List<MatchInfoBase>> programOtherProtocolFlow(AceIp acl); static Map<String,List<MatchInfoBase>> programIcmpFlow(AceIp acl); static Map<String,List<MatchInfoBase>> programTcpFlow(AceIp acl); static Map<String,List<MatchInfoBase>> programUdpFlow(AceIp acl); static List<MatchInfoBase> addSrcIpMatches(AceIp acl); static List<MatchInfoBase> addDstIpMatches(AceIp acl); static List<MatchInfoBase> addLPortTagMatches(int lportTag, int conntrackState, int conntrackMask,
            Class<? extends ServiceModeBase> serviceMode); static List<InstructionInfo> getDropInstructionInfo(); static List<InstructionInfo> getResubmitInstructionInfo(short tableId); static List<InstructionInfo> getGotoInstructionInfo(short gotoTableId); static Map<Integer,Integer> getLayer4MaskForRange(int portMin, int portMax);  }
@Test public void testProgramIpFlow_NullMatches() { assertNull(AclServiceOFFlowBuilder.programIpFlow(null)); }