Adjustments for JDK 8 Build

Fixed broken tests when built with JDK 8.