Fix tests on jdk6