The Spark style is (less curly brackets)

    testData.map { x =>
      ...
    }