Avoid defining def inside test methods and upgrade to Scala 2.10.4