org.mockito.exceptions.misusing.wrongTypeofReturnValue
//use
doReturn(fooBar).when(bar).getFoo()
//instead of
when(bar.getFoo()).thenReturn(fooBar)
Powerful Pheasant