public void testPutEntryPositive() {
String credentials = adminCredentials();
for (String mediaType : ENTRY_MEDIA_TYPES) {
createUser(credentials, mediaType, "newuser", "oldpass");
Entry entry = getEntry(credentials, mediaType, "newuser");
User user = helper.getContentEntity(entry, MediaType.APPLICATION_XML_TYPE, User.class);
assertEquals("Old password for media type " + mediaType, "oldpass", user.getPassword());
user.setPassword("newpass");
helper.setContentEntity(entry, MediaType.APPLICATION_XML_TYPE, user);
putEntry(credentials, mediaType, user);
entry = getEntry(credentials, mediaType, "newuser");
user = helper.getContentEntity(entry, MediaType.APPLICATION_XML_TYPE, User.class);
assertEquals("new password for media type " + mediaType, "newpass", user.getPassword());
deleteUser(credentials, "newuser");
}
}