@Test (enabled = true) public void testProcessHeaderPlaceholder() { underTest = new PlaceholderHandler(); underTest.setResponse(buildResponse()); String stringToProcess = "PIPPO_${header[test_header]}"; String output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value"); stringToProcess = "PIPPO_${header[test_header]}_PLUTO"; output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value_PLUTO"); stringToProcess = "PIPPO_${header[test_header]}_PLUTO_${header[test_header]}"; output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value_PLUTO_test_value"); stringToProcess = "PIPPO_${header[test_header]}_PLUTO_${header[test_header2]}"; output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value_PLUTO_test_value2"); stringToProcess = "PIPPO_${header[test_header]}_PLUTO_${header[test_header2]}_PAPERINO"; output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value_PLUTO_test_value2_PAPERINO"); }
public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; }
PlaceholderHandler { public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; } }
PlaceholderHandler { public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; } PlaceholderHandler(); }
PlaceholderHandler { public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; } PlaceholderHandler(); Map<String, HeatPlaceholderModuleProvider> constructProviderMap(Map<String, HeatPlaceholderModuleProvider> providerMapInput,
            List<String> handledPlaceholders,
            HeatPlaceholderModuleProvider provider); Object placeholderProcessString(String inputStr); String getPathVar(String inputObj); String processHeaderPlaceholder(String inputString); Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap); void setResponse(Response rsp); void setPreloadedVariables(Map<String, Object> preloadedVarsInput); Map<String, Object> getPreloadedVariables(); void setFlowVariables(Map<Integer, Map<String, String>> flowPreloadedVariables); }
PlaceholderHandler { public String processHeaderPlaceholder(String inputString) { String outputString = inputString; if (response != null) { outputString = processGenericPlaceholders(inputString, REGEXP_HEADER_PLACEHOLDER, this::getHeaderVar); } return outputString; } PlaceholderHandler(); Map<String, HeatPlaceholderModuleProvider> constructProviderMap(Map<String, HeatPlaceholderModuleProvider> providerMapInput,
            List<String> handledPlaceholders,
            HeatPlaceholderModuleProvider provider); Object placeholderProcessString(String inputStr); String getPathVar(String inputObj); String processHeaderPlaceholder(String inputString); Map<String, Object> placeholderProcessMap(Map<String, Object> requestParamsMap); void setResponse(Response rsp); void setPreloadedVariables(Map<String, Object> preloadedVarsInput); Map<String, Object> getPreloadedVariables(); void setFlowVariables(Map<Integer, Map<String, String>> flowPreloadedVariables); static final String DEFAULT_PRELOADED_VALUE; static final String PLACEHOLDER_SYMBOL; static final String PLACEHOLDER_SYMBOL_BEGIN; static final String PLACEHOLDER_SYMBOL_END; static final String PLACEHOLDER_JSON_SCHEMA_NO_CHECK; static final String PATH_PLACEHOLDER; static final String PLACEHOLDER_NOT_PRESENT; static final String PLACEHOLDER_PRESENT; static final String PATH_JSONPATH_REGEXP; }