Java - Passing Multiple Headers

Hello All,

I am using Gatling 3.7.3 on Java 17.
I have recorded the test scenario, the following code got generated by the Gatling, but this code is giving the error.

private Map<CharSequence, String> headers_3 = Map.ofEntries(
Map.entry(“Accept”, “image/avif,image/webp,**”),
Map.entry(“Cache-Control”, “max-age=0”),
Map.entry(“If-Modified-Since”, “Fri, 24 Jan 2020 16:49:16 GMT”),
Map.entry(“If-None-Match”, “”"“5e2b200c-62b4"”""),
Map.entry(“Sec-Fetch-Dest”, “image”),
Map.entry(“Sec-Fetch-Mode”, “no-cors”),
Map.entry(“Sec-Fetch-Site”, “same-origin”)

I have checked the documentation
. It shows the following example for Java, but giving an error “params” is not resolved.

Map<String, String> sentHeaders = new HashMap<>();
params.put(“content-type”, “application/javascript”);
params.put(“accept”, “text/html”);

Can anyone suggest to me the correct definition for Headers?