diff --git a/runtime/v2/services_test.go b/runtime/v2/services_test.go index 83e16d4e7141..9974d7176da7 100644 --- a/runtime/v2/services_test.go +++ b/runtime/v2/services_test.go @@ -39,8 +39,11 @@ func TestRegisterServices(t *testing.T) { }, } - mockModule.On("RegisterMsgHandlers", app.msgRouterBuilder).Once() - mockModule.On("RegisterQueryHandlers", app.queryRouterBuilder).Once() + msgWrapper := newStfRouterWrapper(app.msgRouterBuilder) + queryWrapper := newStfRouterWrapper(app.queryRouterBuilder) + + mockModule.On("RegisterMsgHandlers", &msgWrapper).Once() + mockModule.On("RegisterQueryHandlers", &queryWrapper).Once() err := mm.RegisterServices(app)