Add test program for friend methods