### Question:
PlaceholderHandler { private String processCookiePlaceholder(String input) { String outputObj = input; if (response != null) { outputObj = processGenericPlaceholders(input, REGEXP_COOKIE_PLACEHOLDER, this::getCookieVar); } return outputObj; } 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; }### Answer:
@Test (enabled = true) public void testProcessCookiePlaceholder() { underTest = new PlaceholderHandler(); underTest.setResponse(buildResponse()); String stringToProcess = "PIPPO_${cookie[test_cookie]}"; String output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value"); stringToProcess = "PIPPO_${cookie[test_cookie]}_PLUTO"; output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value_PLUTO"); stringToProcess = "PIPPO_${cookie[test_cookie]}_PLUTO_${cookie[test_cookie]}"; output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value_PLUTO_test_value"); stringToProcess = "PIPPO_${cookie[test_cookie]}_PLUTO_${cookie[test_cookie2]}"; output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value_PLUTO_test_value2"); stringToProcess = "PIPPO_${cookie[test_cookie]}_PLUTO_${cookie[test_cookie2]}_PAPERINO"; output = (String) underTest.placeholderProcessString(stringToProcess); Assert.assertEquals(output, "PIPPO_test_value_PLUTO_test_value2_PAPERINO"); }