I have:
when(Long.valueOf(anyString())).thenReturn(anyLong());
It gets a NumberFormatException
on Long.valueOf(String)
because "" is being passed in.
The code I'm testing is this:
final Long id = Long.valueOf(foo.bar());
How can I get around that?