Add testing for friendly forwarding
Code to implement friendly forwarding.