when(response.getEntity()).thenReturn(responseBody);
when(response.getStatusLine()).thenReturn(statusLine);
when(response.getAllHeaders()).thenReturn(buildHeaders());
when(httpClient.execute(any(HttpUriRequest.class))).thenReturn(response);
CloudsealUser newUser = new CloudsealUser();
newUser.setUsername("test");
newUser.setFirstName("test");
newUser.setLastName("user");
newUser.setEmail("test@test.com");
CloudsealUser user = classUnderTest.put("/rest/user/test", newUser);
assertEquals("test", user.getUsername());
assertEquals("test", user.getFirstName());
assertEquals("user", user.getLastName());
assertEquals("password", user.getPassword());
}