Make tests pass with java 7
Merge pull request #954 from yDelouis/953_fixTestJava7

Make tests pass with java 7