Fixing tests for JDK 1.7

Fixed a couple of tests so that they work under JDK 1.7.