billybong
05/08/2017, 11:49 AMval rights: MyApiClient = mock<MyApiClient>{
on {fetchByIds(any())} doReturn emptyList<Response>()
}
nhaarman
05/08/2017, 11:52 AMMyApiClient
and fetchById
, and what is the stack trace?billybong
05/08/2017, 11:58 AMnhaarman
05/08/2017, 12:04 PMfetchByIds
is still executed because it can't be mocked: is it declared open
as well?billybong
05/08/2017, 12:04 PMnhaarman
05/08/2017, 12:04 PMbillybong
05/08/2017, 12:04 PMbillybong
05/08/2017, 12:05 PMtapchicoma
05/08/2017, 12:05 PMtapchicoma
05/08/2017, 12:07 PMfetchByIds()
function definition? It may happen that it returns list of Response?
typenhaarman
05/08/2017, 12:09 PMopen
to the function is to use `mock-maker-inline`: https://github.com/mockito/mockito/wiki/What's-new-in-Mockito-2#unmockablebillybong
05/08/2017, 12:10 PMbillybong
05/08/2017, 12:10 PM