I wish to let the withParameters(String token, RiskRating details)
method take in an object of type that's either a RiskRating object or is a subclass of it
Something like withParameters(String token, T extends RiskRating details)
public Response withParameters(String token, RiskRating details) {
return SerenityRest.given()
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.header("Authorization", "Token " + token)
.body(details)
.post(WebServiceEndPoints.RISKRATING.getUrl());
}
How do I achieve this?