A simple example on how to artificially increase your code coverage with a stupid unit test that calls automatically constructors and getters/setters.
Do not use in the real life! Except from increasing the code coverage statistics, it is totally useless.
Try it:
- copy MagicTest class to your project's /src/test/java/ folder
- set the parent package of your project (hard-coded in MagicTest class)
- add a test dependency to guava
- add cobertura-maven-plugin to the project
- mvn cobertura:cobertura
- have a look a the result at /target/site/cobertura/index.html