if (headerPatternsIter.hasNext()) {
while (headerPatternsIter.hasNext()) {
// try all of the header patterns
final Map headers = new HashMap();
headers.put("user-agent", Collections.singletonList(userAgent));
final HeaderPattern headerPattern =
(HeaderPattern) headerPatternsIter.next();
final String value = generateSample(
headerPattern.getRegularExpression(), replacementStr).trim();
final String key = headerPattern.getName().toLowerCase();
headers.put(key, Collections.singletonList(value));
result.testWithHeaders(headers);
}
} else {
final Map headers = new HashMap();