migrated test from JUnit to ScalaTest