Code coverage can be a very useful metric. However you need to know how, and when, to use it. The link between code coverage and test quality is tenuous at best – in short, high code coverage is, in itself, no guarantee of well tested code. And increasing code coverage for the sake of code [...]
When you are writing unit tests, you want to test all the border cases. You can create a method for every border case, but sometimes this is a very repetitive job. JUnit has a more pragmatic approach for these sorts of tests, called Parameterized tests. The idea is simple. You create your testcase with your [...]