@Test(description = "This method tests the send invitation method of UserManagementService", dependsOnMethods =
        {"testIsUserExists"})

public void testSendInvitation() throws ConfigurationManagementException, DeviceManagementException {
    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getUserStoreManager"))
            .toReturn(this.userStoreManager);
    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
            .toReturn(this.deviceManagementProviderService);
    Mockito.doNothing().when(deviceManagementProviderService).sendEnrolmentInvitation(Mockito.any(), Mockito.any());
    Response response = userManagementService.inviteExistingUsersToEnrollDevice(userList);
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
            "Inviting existing users to enroll device failed");
}