def METHOD_NAME(self):
    notice = UserNotification.objects.add_repo_share_to_group_msg(
        self.user.username,
        repo_share_to_group_msg_to_json('bar@bar.com', self.repo.id, self.group.id, '/', None))
    msg = notice.format_repo_share_to_group_msg()
    assert msg is not None
    assert 'bar has shared a library named' in msg
    assert '/group/%(group_id)s/' % {'group_id': self.group.id} in msg