akka/akka — pull request #15370 by mkubala (2014-06-05 22:15:49+00:00)
Title: +tes #15132 Add additional overloaded expectMsg to TestKit

My first idea was to implement this in terms of delegation to expectMsgPF, as @ktoso did here: https://github.com/akka/akka/pull/15122/files#r12341015

But I figured out that such solution had a couple cons:
* information about what we were expecting may be lost in case when received message didn't match and hint doesn't contain anything about expected message. (hint in expectMsgPF is used to bring some general info about what our partial function expects.. For example: we could pass "Expected response" hint in case when have PF that matches against some ACK and SYN_ACK responses).
* in case of expectMsg, we already have all necessary information (what we expected vs what we got), so the hint parameter will play the role of some additional message and IMO should be appended at the end of message passed to an AssertionError.

That's why I've decided to extend expectMsg_internal.

PS - I've signed Typesafe CLA.