Add a test for the onInvite method. refs #215