### Question:
ParamDerivator { public abstract List<Map<String, ParameterValue>> deriveParameter(Map<String, ParameterValue> params);  abstract List<Map<String, ParameterValue>> deriveParameter(Map<String, ParameterValue> params); static final Long IPv4; static final Long IPv6; static final ParamDerivator ETHER_TYPE_DERIVATOR; }### Answer:
@Test public void testDeriveParameter_noDerivation() { Map<String, ParameterValue> params = new HashMap<>(); ParameterValue pv = new ParameterValueBuilder().setIntValue(EtherTypeClassifierDefinition.IPv4_VALUE).build(); params.put(EtherTypeClassifierDefinition.ETHERTYPE_PARAM, pv); List<Map<String, ParameterValue>> result = derivator.deriveParameter(params); assertEquals(1, result.size()); assertEquals(params, result.get(0)); }
@Test public void testDeriveParameter_withDerivation() { Map<String, ParameterValue> params = new HashMap<>(); ParameterValue pv = new ParameterValueBuilder().setIntValue(EtherTypeClassifierDefinition.IPv4_VALUE).build(); params.put("dummy key", pv); List<Map<String, ParameterValue>> derivedParams = derivator.deriveParameter(params); assertEquals(2, derivedParams.size()); Map<String, ParameterValue> ipv4Params = derivedParams.get(0); Map<String, ParameterValue> ipv6Params = derivedParams.get(1); assertTrue(ipv4Params.containsKey(EtherTypeClassifierDefinition.ETHERTYPE_PARAM)); assertTrue(ipv6Params.containsKey(EtherTypeClassifierDefinition.ETHERTYPE_PARAM)); }