add invite handler test. for #319