How can we mock the IRouteHandlerRegistry? The error is Cannot resolve method thenReturn(IHandleRoute)
IRouteHandlerRegistry
Cannot resolve method thenReturn(IHandleRoute)
public interfac
Mockito.when argument should be a method not a mock.
Mockito.when
The correct statement is: when(registry.getHandlerFor (route)).thenReturn(handler)
when(registry.getHandlerFor (route)).thenReturn(handler)