Fix tests on JDK 1.6.