org.mockito.exceptions.misusing.wrongtypeofreturnvalue cannot be returned by tostring() code example
Example: org.mockito.exceptions.misusing.WrongTypeOfReturnValue
//use
doReturn(fooBar).when(bar).getFoo()
//instead of
when(bar.getFoo()).thenReturn(fooBar)