@Test public void testIsProtocolOfOneWithinTwo_oneProtocolTcpTwoProtocolUdp() { SecurityRuleAttributes.Protocol protocolTcp = new SecurityRuleAttributes.Protocol(ProtocolTcp.class); SecurityRule one = secRuleBuilder.setProtocol(protocolTcp).build(); SecurityRuleAttributes.Protocol protocolUdp = new SecurityRuleAttributes.Protocol(ProtocolUdp.class); SecurityRule two = secRuleBuilder.setProtocol(protocolUdp).build(); assertFalse(SecRuleEntityDecoder.isProtocolOfOneWithinTwo(one, two)); }
public static boolean isProtocolOfOneWithinTwo(SecurityRule one, SecurityRule two) { Long oneProtocol = getProtocol(one); Long twoProtocol = getProtocol(two); return twoIsNullOrEqualsOne(oneProtocol, twoProtocol); }
SecRuleEntityDecoder { public static boolean isProtocolOfOneWithinTwo(SecurityRule one, SecurityRule two) { Long oneProtocol = getProtocol(one); Long twoProtocol = getProtocol(two); return twoIsNullOrEqualsOne(oneProtocol, twoProtocol); } }
SecRuleEntityDecoder { public static boolean isProtocolOfOneWithinTwo(SecurityRule one, SecurityRule two) { Long oneProtocol = getProtocol(one); Long twoProtocol = getProtocol(two); return twoIsNullOrEqualsOne(oneProtocol, twoProtocol); } private  SecRuleEntityDecoder(); }
SecRuleEntityDecoder { public static boolean isProtocolOfOneWithinTwo(SecurityRule one, SecurityRule two) { Long oneProtocol = getProtocol(one); Long twoProtocol = getProtocol(two); return twoIsNullOrEqualsOne(oneProtocol, twoProtocol); } private  SecRuleEntityDecoder(); static ContractId getContractId(SecurityRule secRule); static ClassifierInstance getClassifierInstance(SecurityRule secRule); static ActionRef createActionRefFromActionChoice(ActionChoice action); static ClassifierRef getClassifierRef(SecurityRule secRule); static Direction getDirection(SecurityRule secRule); static Clause getClause(SecurityRule secRule); static boolean isEtherTypeOfOneWithinTwo(SecurityRule one, SecurityRule two); static boolean isProtocolOfOneWithinTwo(SecurityRule one, SecurityRule two); static boolean isPortsOfOneWithinTwo(SecurityRule one, SecurityRule two); static Long getEtherType(SecurityRule secRule); static Long getProtocol(SecurityRule secRule); }
SecRuleEntityDecoder { public static boolean isProtocolOfOneWithinTwo(SecurityRule one, SecurityRule two) { Long oneProtocol = getProtocol(one); Long twoProtocol = getProtocol(two); return twoIsNullOrEqualsOne(oneProtocol, twoProtocol); } private  SecRuleEntityDecoder(); static ContractId getContractId(SecurityRule secRule); static ClassifierInstance getClassifierInstance(SecurityRule secRule); static ActionRef createActionRefFromActionChoice(ActionChoice action); static ClassifierRef getClassifierRef(SecurityRule secRule); static Direction getDirection(SecurityRule secRule); static Clause getClause(SecurityRule secRule); static boolean isEtherTypeOfOneWithinTwo(SecurityRule one, SecurityRule two); static boolean isProtocolOfOneWithinTwo(SecurityRule one, SecurityRule two); static boolean isPortsOfOneWithinTwo(SecurityRule one, SecurityRule two); static Long getEtherType(SecurityRule secRule); static Long getProtocol(SecurityRule secRule);  }