Mocking service imlementation's non-service helper method

Hi everyone, I need to mock my service implementation’s helper method.

I defined my statement inside of the ServiceTest.startServer() block. But it doesn’t work. I think it doesn’t override any value. Any ideas?

 val mockNotificationServiceImpl: NotificationServiceImpl = mock[NotificationServiceImpl]
 when(mockNotificationServiceImpl.sendNotification(anyObject())).thenReturn(...)