Request body is:-
{
"request":
{
"body":
{
"ABC":["XYZ"],
"PASSWORD": "password"
}
}
MY CODE:-
I am getting error in response because the ABC value is going in string format
Map body = new LinkedHashMap(6);
body.put("ABC","XYZ");
body.put("PASSWORD","password");
what is the correct way to write this request body using LinkedHashMap in restAssured
"ABC":["XYZ"],
You just need change it to List<String>
body.put("ABC", Arrays.asList("XYZ"));