Make Scala demo test work.
Note waitFor is typically used wrongly.