Add test: friend function