@Test public void testCheckPresenceOfRequiredParams() { Map<String, ParameterValue> params = new HashMap<>(); ParameterValue pv = new ParameterValueBuilder().setIntValue(EtherTypeClassifierDefinition.ARP_VALUE).build(); params.put(EtherTypeClassifierDefinition.ETHERTYPE_PARAM, pv); try { Classifier.ETHER_TYPE_CL.checkPresenceOfRequiredParams(params); } catch (IllegalArgumentException e) { fail("Required parameter missing"); } }
@Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " not specified."); } if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " parameter is not present."); } }
EtherTypeClassifier extends Classifier { @Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " not specified."); } if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " parameter is not present."); } } }
EtherTypeClassifier extends Classifier { @Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " not specified."); } if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " parameter is not present."); } } EtherTypeClassifier(Classifier parent); }
EtherTypeClassifier extends Classifier { @Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " not specified."); } if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " parameter is not present."); } } EtherTypeClassifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues(); }
EtherTypeClassifier extends Classifier { @Override protected void checkPresenceOfRequiredParams(Map<String, ParameterValue> params) { if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM) == null) { throw new IllegalArgumentException( "Parameter " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " not specified."); } if (params.get(EtherTypeClassifierDefinition.ETHERTYPE_PARAM).getIntValue() == null) { throw new IllegalArgumentException( "Value of " + EtherTypeClassifierDefinition.ETHERTYPE_PARAM + " parameter is not present."); } } EtherTypeClassifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues();  }