for (int i = 0; i < randomHead; i++)
headList.add(i);
for (int i = 1; i < randomTail; i++)
tailList.add(i);
ActorRef sequencingActorRef = _system.actorOf(new Props(
new UntypedActorFactory() {
public UntypedActor create() {
return new SequencingActor(testActor(), headList,
tailList);
}
}));
// pass the reference to implicit sender testActor() otherwise
// message end up in dead mailbox
sequencingActorRef.tell("do something", super.testActor());
for (Integer value : headList) {
expectMsgClass(Integer.class);
}
expectMsg("do something");