Made unit test JDK6 compliant