Java version update etc.

This is to downgrade java version to 1.6 so that it can be used by projects still on java 1.6. Also updated the test library dependency to test scope, so it doesn't get pulled in production artifact.