Get friend function and test