Java7 build and test compatibility