function testRemoteTelephoneCallFromOrigin() public {
// check behavior on origin
vm.expectEmit(true, true, true, false);
emit TelephoneRinging(destination, TypeCasts.bytes32ToAddress(destinationTelephone), "Hello!"); // example event on origin
originTelephone.callRemote(destination, TypeCasts.bytes32ToAddress(destinationTelephone), "Hello!");
// simulating message delivery origin -> destination
environment.processNextPendingMessage();
// check behavior on destination
assertEq(destinationTelephone.latestMessage(originTelephone) == "Hello!");
}
function testRemoteTelephoneCallFromDestination() public {
// check behavior on destination
vm.expectEmit(true, true, true, false);
emit TelephoneRinging(origin, TypeCasts.bytes32ToAddress(originTelephone), "Howdy!"); // example event on destination
destinationTelephone.callRemote(origin, TypeCasts.bytes32ToAddress(originTelephone), "Howdy!");
// simulating message delivery destination -> origin
environment.processNextPendingMessageFromDestination();
// check behavior on origin
assertEq(originTelephone.latestMessage(destinationTelephone) == "Howdy!");
}