Corrected issues in the unit tests as identified by FindBugs.