Fixed unittest to be JDK implementation independent.