I have the following class with constructor chaining , but the validations are returning Method not found or incorrect signature
class
@IsTest
global class CalloutMock implements HttpCalloutMock {
private Map<String,HttpResponse> httpResponseMap = new Map<String,HttpResponse>();
global CalloutMock(Map<String,HttpResponse> responseMap){
if (responseMap != null) {
httpResponseMap = responseMap;
}
}
global CalloutMock(){
CalloutMock(null);
}
global HttpResponse respond(HttpRequest req) {
System.debug('req end point hitting is ' + req.getEndpoint());
return httpResponseMap.get(req.getEndpoint());
}
}
why is that ? and how do i resolve it?
this(null);
instead ofCalloutMock(null);