I am working with Akka FSM. I have implemented state change with AbstractFSMWithStash
. But I am not sure how to write a unit test case to verify that the actor changes its state. Does Akka provide any methods to access the state of the actor for unit testing?
I could not find much on the documentation page at https://doc.akka.io/docs/akka/current/fsm.html.
With scala, we can use
TestFSMRef
to create the FSM actor we intend to test and then usestateName
. Example: