@Test(description = "This method tests the getUser method of UserManagementService", dependsOnMethods =
        "testAddUser")
public void testGetUser() throws UserStoreException {

    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getUserStoreManager"))
            .toReturn(this.userStoreManager);
    Response response = userManagementService.getUser(TEST_USERNAME, null, null);
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(), "User retrieval failed");
    BasicUserInfo userInfo = (BasicUserInfo) response.getEntity();
    Assert.assertEquals(userInfo.getFirstname(), TEST_USERNAME,
            "Retrieved user object is different from the original one " + "saved");
    Mockito.doReturn(false).when(userStoreManager).isExistingUser(TEST2_USERNAME);
    response = userManagementService.getUser(TEST2_USERNAME, null, null);
    Assert.assertEquals(response.getStatus(), Response.Status.NOT_FOUND.getStatusCode(),
            "Non-existing user was retrieved successfully");
}