0

I write a unit test for "update function" of Spark.streaming.mapWithState and I need Mock the "org.apache.spark.streaming.State" parameter, but it's a sealed class, compiler complains about an exception: illegal inheritance from sealed class State. How should I test my function?

belle tian
  • 897
  • 8
  • 20

1 Answers1

0

A sealed trait can only be extended in the same source file as it's declared. So Scalamock has no chance of mocking this type.

Philipp
  • 967
  • 6
  • 16