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?
Asked
Active
Viewed 166 times
1 Answers
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