Fix compile error in test cases for Scala 2.11