@Test public void testCheckPresenceOfRequiredParameters_ProtoMissing() { Map<String, ParameterValue> params = new HashMap<>(); params.putAll( ClassifierTestUtils.createIntValueParam(EtherTypeClassifierDefinition.ETHERTYPE_PARAM, FlowUtils.IPv4)); thrown.expect(IllegalArgumentException.class); thrown.expectMessage(Classifier.MSG_NOT_SPECIFIED); Classifier.IP_PROTO_CL.checkPresenceOfRequiredParams(params); }
@Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(IpProtoClassifierDefinition.PROTO_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_NOT_SPECIFIED); } if (params.get(IpProtoClassifierDefinition.PROTO_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_PARAMETER_IS_NOT_PRESENT); } }
IpProtoClassifier extends Classifier { @Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(IpProtoClassifierDefinition.PROTO_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_NOT_SPECIFIED); } if (params.get(IpProtoClassifierDefinition.PROTO_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_PARAMETER_IS_NOT_PRESENT); } } }
IpProtoClassifier extends Classifier { @Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(IpProtoClassifierDefinition.PROTO_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_NOT_SPECIFIED); } if (params.get(IpProtoClassifierDefinition.PROTO_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_PARAMETER_IS_NOT_PRESENT); } } protected  IpProtoClassifier(Classifier parent); }
IpProtoClassifier extends Classifier { @Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(IpProtoClassifierDefinition.PROTO_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_NOT_SPECIFIED); } if (params.get(IpProtoClassifierDefinition.PROTO_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_PARAMETER_IS_NOT_PRESENT); } } protected  IpProtoClassifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues(); static Long getIpProtoValue(Map<String, ParameterValue> params); }
IpProtoClassifier extends Classifier { @Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(IpProtoClassifierDefinition.PROTO_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_NOT_SPECIFIED); } if (params.get(IpProtoClassifierDefinition.PROTO_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + IpProtoClassifierDefinition.PROTO_PARAM + " " + MSG_PARAMETER_IS_NOT_PRESENT); } } protected  IpProtoClassifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues(); static Long getIpProtoValue(Map<String, ParameterValue> params);  }