What I am trying to do is use the second method to create a pattern so that in the first method I only have to write the second method name with a parameter, in order to extract different values from a response body by passing the key-name as parameter.
The response from the second method displays an error "Cannot resolve symbol 'response'"
public class BDDStyledMethod {
public static void GetActivityById(){
Response response=Authentication.Creds("www.randomurl.com");
System.out.println("The extracted thing is: " + bodyResponse("name"));
}
public static String bodyResponse(String exe){
JsonPath jsonPathEvaluator = response.jsonPath();
String bodyExample = jsonPathEvaluator.get(exe).toString();
return bodyExample;
}