#173 solution and added unit test with added test checks
Fix JDK 6 compilation
#180 fix