Simplified unit test for compatibility with JDK6.