Junit


JUnit in Action, Second Edition
Practical Unit Testing with JUnit and Mockito
Pragmatic Unit Testing in Java with JUnit
JUnit Pocket Guide
Java Unit Testing with JUnit 5: Test Driven Development with JUnit 5
Test Driven: Practical TDD and Acceptance TDD for Java Developers
Test-Driven Development: By Example
xUnit Test Patterns: Refactoring Test Code
Testing with JUnit
Mastering Unit Testing Using Mockito and JUnit
JUNIT
JUnit Recipes: Practical Methods for Programmer Testing
The approach shown... is a common pattern for testing exception-throwing behavior with JUnit.
@Test 
public void missingValueRaisesException() throws Exception {
 try {
 new Template("${foo}").evaluate();
 fail("evaluate() should throw an exception if "
 + "a variable was left without a value!");
 } catch (MissingValueException expected) {
 }
}
...more
Lasse Koskela, Test Driven: Practical TDD and Acceptance TDD for Java Developers