Fixed compilation problems of some unit test using jdk 5 and 6