Make the test pass on JDK7