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-

global class MockFirebaseResponseGenerator {
    global HttpResponse respond(HttpRequest req) {
        HttpResponse response = new HttpResponse();
        return response;

public class TEST_FirebaseNotificationHandler {
    static void testCallout(){
        // create test data
        Test.setMock(HttpCalloutMock.class, new MockFirebaseResponseGenerator());       

1 Answer 1


This specific error is a simple omission of the implementation of HttpCalloutMock. Change:

global class MockFirebaseResponseGenerator


global class MockFirebaseResponseGenerator implements HttpCalloutMock

Note, too, that it is unlikely you need to make any of what you have here global and should instead use public. The global access modifier is for cross-namespace access.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .