title: Whether to do a NULL check in test cases if static analysis is enabled?
body: <p>Our project have static analysis enabled, and, when it comes to testing, we starting to worry if we should test for NULL check or anything that may already be tested by the static analysis. </p>
  
  <p>Should I still test for those stuff?</p>
  
  <p>E.g. For method:</p>
  
  <pre><code>@RegEx("bla.*bla") 
  public static String bar(@Nonnull Foo par1)
  </code></pre>
  
  <p>Should we have test this:</p>
  
  <pre><code>assertTrue(Pattern.matches(XXX.bar(someFoo)));
  </code></pre>
  
  <p>Then test for the NPE thrown if null is passed in?</p>
  
  <p>EDIT: We are using Findbugs, but I think the problem also applies to other static code analsis tools.</p>