LPS-42166 - hooks in Scala