Update Scala example with latest API changes