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