sbt test pass

And accordingly, code modifications