JUnit: Test Ballpark Results With Double Values Hey, even though it's a double, that doesn't mean it has to match exactly.
JUnit: Test Exception Conditions With assertThrows() Make sure things go wrong the way they're supposed to go wrong.