@Test(description = "This method tests the removeUser method of UserManagementService", dependsOnMethods =
        "testInviteToEnrollDevice")
public void testRemoveUser() throws DeviceManagementException, UserStoreException {

    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getUserStoreManager"))
            .toReturn(this.userStoreManager);
    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
            .toReturn(this.deviceManagementProviderService);
    Mockito.doReturn(true).when(deviceManagementProviderService).setStatus(Mockito.anyString(), Mockito.any());
    Mockito.doNothing().when(userStoreManager).deleteUser(Mockito.anyString());
    Response response = userManagementService.removeUser(TEST_USERNAME, null);
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
            "Cannot remove user, the request failed");
    response = userManagementService.removeUser(TEST2_USERNAME, null);
    Assert.assertEquals(response.getStatus(), Response.Status.NOT_FOUND.getStatusCode(),
            "Successfully removed non-existing user");
}