In my case I had the code compiled with scala 2.13, but my tests are based on maven-surefire-plugin which was still an older version using scala 2.12. Updating surefire plugin version to latest (in my case 4.9.2) worked as it seems to be built on scala 2.13.