converted test from JUnit to Scala Test