public ClientDriverRequest withHeaders(Map<String, Object> headers) {
for (Entry<String, Object> entry : headers.entrySet()) {
String headerName = entry.getKey();
Object headerValue = entry.getValue();
if (headerValue instanceof Pattern) {
withHeader(headerName, new MatchesRegex((Pattern) headerValue));
} else {
withHeader(headerName, new IsEqual<String>(headerValue.toString()));
}
}
return this;