Use findbugs
Restructure the test cases