implemented Java tests as ScalaTest WordSpecs