I would do:
1) Create a class with some function that accepts message.
public class MyMockieSender
{
public function sendMessage(msg:*):*
{
}
}
2) Create mock for this class
var mockieSender:MyMockieSender = mock(MyMockieSender);
3) Take the sendMessage function pointer of the mockieSender and assign it to the SomeClass instance:
var someClass:SomeClass = new SomeClass();
someClass.sendMessage = mockieSender.sendMessage;
4) Make the test call
someClass.sendSomeMsg();
5) And verify on the mock what got called
verify().that(mockieSender.sendMessage(any()));
Hope this helps
Cheers,
Kris