Added tests and set java compiler version to 1.7.