Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
JUnit tests should include at least one assertion. This makes the tests more robust, and using assert with messages provide the developer a clearer idea of what the test does.
public class Foo extends TestCase {
  public void testSomething() {
    Bar b = findBar();;
    // violation, we could use assertNotNull("bar not found", b);
New to GrepCode? Check out our FAQ X