JMeterVariables vars = new JMeterVariables();
vars.put("title_prefix", "a test\u00c5");
vars.put("description_suffix", "the_end");
JMeterContextService.getContext().setVariables(vars);
JMeterContextService.getContext().setSamplingStarted(true);
ValueReplacer replacer = new ValueReplacer();
replacer.setUserDefinedVariables(testPlan.getUserDefinedVariables());
sampler = createHttpSampler(samplerType);
contentEncoding = "UTF-8";
titleValue = "${title_prefix}mytitle5\u0153\u20a1\u0115\u00c5";
descriptionValue = "mydescription5\u0153\u20a1\u0115\u00c5${description_suffix}";
setupUrl(sampler, contentEncoding);
sampler.setMethod(HTTPConstants.GET);
setupFormData(sampler, false, titleField, titleValue, descriptionField, descriptionValue);
// Replace the variables in the sampler
replacer.replaceValues(sampler);
res = executeSampler(sampler);
String expectedTitleValue = "a test\u00c5mytitle5\u0153\u20a1\u0115\u00c5";
String expectedDescriptionValue = "mydescription5\u0153\u20a1\u0115\u00c5the_end";
sampler.setRunningVersion(true);
executedUrl = sampler.getUrl();