When testing an Akka actor with the TestKit
, https://doc.akka.io/docs/akka/2.5/testing.html shows how to verify that a given message was logged.
Is there a way to check for the lack of a message?
I have my actors set up to call a method the logs something like "Unexpected message received" when an unhandled message is received. In my test, I would like to verify that that message is never logged, even if the test otherwise seems to succeed. Is there a way to do that?
I am using Akka 2.5 and Java 10.