@Test
public void testUpdateUser() throws Exception {

    User userWithoutComment = new User().setEmail(DUMMY_EMAIL_ADDRESS_2);
    handler.addUser(userWithoutComment); // does not contain a comment
    // update `userWithoutComment` with some stuff
    userWithoutComment.setDepartment(DUMMY_DEPARTMENT);
    userWithoutComment.setCommentMadeDuringModerationRequest(DUMMY_COMMENT);
    handler.updateUser(userWithoutComment); // now contains a comment
    User userFromDatabase = handler.getByEmail(DUMMY_EMAIL_ADDRESS_2);
    assertEquals(DUMMY_EMAIL_ADDRESS_2, userFromDatabase.getEmail());
    assertEquals(DUMMY_DEPARTMENT, userFromDatabase.getDepartment());
    assertFalse(userFromDatabase.isSetCommentMadeDuringModerationRequest());
}