@Test(description = "This method tests the IsUserExists method of UserManagementService", dependsOnMethods =
        {"testGetRolesOfUser"})

public void testIsUserExists() {
    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getUserStoreManager"))
            .toReturn(this.userStoreManager);
    Response response = userManagementService.isUserExists(TEST2_USERNAME);
    boolean responseEntity = (boolean) response.getEntity();
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
            "Check for existence of user failed");
    Assert.assertFalse(responseEntity, "Non-existing user is identified as already existing user");
    response = userManagementService.isUserExists(TEST_USERNAME);
    responseEntity = (boolean) response.getEntity();
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
            "Check for existence of user failed");
    Assert.assertTrue(responseEntity, "Existing user is identified as non-existing user");
}