CAL-861 small refactor on unit test for rest api
CAL-861 test for invitations