Let us say that methodB is a call to an external service (preferable
returning a Future, but that is irrelevant for the question).
That external service is not valid in some test environments and therefore
you want to stub it. Valid use case.
There are several ways to solve that. For example:
1)
The issue of testing business functionality that may be implemented in the
class extending Actor has been raised quite a few times and I haven't found
any good suggestions yet. Most Actor testing examples are focused around
message receipt, type, timing etc. Akka team's response to this
post