@Test(expectedExceptions = DuplicateParameterException.class) public void testDuplicateParameter() { Map<String, Object> inputParams = new HashMap<>(); inputParams.put(VALID_PARAM, null); Map<String, JsonNode> parameterMap = new HashMap<>(); extractor.updateParameterMap(parameterMap, jsonHelper.getObjectMapper().valueToTree(inputParams)); extractor.updateParameterMap(parameterMap, jsonHelper.getObjectMapper().valueToTree(inputParams)); }
@Override public void updateParameterMap(Map<String, JsonNode> parameterMap, JsonNode templateStaticParameters) { if(parameterMap == null) return; Iterator<Map.Entry<String, JsonNode>> staticParametersIterator = templateStaticParameters.fields(); while(staticParametersIterator.hasNext()) { Map.Entry<String, JsonNode> entry = staticParametersIterator.next(); putParameter(parameterMap, entry.getKey(), entry.getValue()); } }
BasicParametersExtractor extends ParametersExtractor { @Override public void updateParameterMap(Map<String, JsonNode> parameterMap, JsonNode templateStaticParameters) { if(parameterMap == null) return; Iterator<Map.Entry<String, JsonNode>> staticParametersIterator = templateStaticParameters.fields(); while(staticParametersIterator.hasNext()) { Map.Entry<String, JsonNode> entry = staticParametersIterator.next(); putParameter(parameterMap, entry.getKey(), entry.getValue()); } } }
BasicParametersExtractor extends ParametersExtractor { @Override public void updateParameterMap(Map<String, JsonNode> parameterMap, JsonNode templateStaticParameters) { if(parameterMap == null) return; Iterator<Map.Entry<String, JsonNode>> staticParametersIterator = templateStaticParameters.fields(); while(staticParametersIterator.hasNext()) { Map.Entry<String, JsonNode> entry = staticParametersIterator.next(); putParameter(parameterMap, entry.getKey(), entry.getValue()); } }  }
BasicParametersExtractor extends ParametersExtractor { @Override public void updateParameterMap(Map<String, JsonNode> parameterMap, JsonNode templateStaticParameters) { if(parameterMap == null) return; Iterator<Map.Entry<String, JsonNode>> staticParametersIterator = templateStaticParameters.fields(); while(staticParametersIterator.hasNext()) { Map.Entry<String, JsonNode> entry = staticParametersIterator.next(); putParameter(parameterMap, entry.getKey(), entry.getValue()); } }  @Override void updateParameterMap(Map<String, JsonNode> parameterMap, JsonNode templateStaticParameters); }
BasicParametersExtractor extends ParametersExtractor { @Override public void updateParameterMap(Map<String, JsonNode> parameterMap, JsonNode templateStaticParameters) { if(parameterMap == null) return; Iterator<Map.Entry<String, JsonNode>> staticParametersIterator = templateStaticParameters.fields(); while(staticParametersIterator.hasNext()) { Map.Entry<String, JsonNode> entry = staticParametersIterator.next(); putParameter(parameterMap, entry.getKey(), entry.getValue()); } }  @Override void updateParameterMap(Map<String, JsonNode> parameterMap, JsonNode templateStaticParameters);  }