Whenever a new record of object abc is created, a queueable trigger handler makes http callout. My trigger handler is working fine and i am able to do what I intended, but when I test this trigger handler, I get this error -
"System.TypeException: Mock object doesn't implement the supplied interface"
Please provide some insights on what I am doing wrong and how to correct it. Thanks.
this is my mock response generator-
@isTest
global class MockFirebaseResponseGenerator {
global HttpResponse respond(HttpRequest req) {
HttpResponse response = new HttpResponse();
response.setBody('{"success":1,"failure":0}');
response.setStatusCode(200);
return response;
}
}
@isTest
public class TEST_FirebaseNotificationHandler {
@isTest
static void testCallout(){
// create test data
Test.setMock(HttpCalloutMock.class, new MockFirebaseResponseGenerator());
}
}