fixes JDK bug: 5051418
fix invalid casting
move unit test to @beforeClass and test its output as a separate test, due to parallel test running
remove un-needed done.
force a 1.7 jdk on build
2b4