}
String friendshipRoleName = RoleDao.FRIENDS_OF_ROLE+to;
boolean isFriend = RoleService.hasRole(from,friendshipRoleName);
if (isFriend){
throw new AlreadyFriendsException("User "+fromUser.getName()+ " is already a friend of "+to);
}
UserService.addUserToRole(fromUser.getName(),friendshipRoleName);
ODocument toUser = UserService.getUserProfilebyUsername(to);
return toUser;
}