@Test
public void testUpdateUser() {

    HttpServletRequest request = mock(HttpServletRequest.class);
    RevisionInfo revisionInfo = new RevisionInfo("client1", 1L);
    User user = new User("identifier", "new-identity");
    user.setRevision(revisionInfo);
    when(serviceFacade.updateUser(user)).thenReturn(user);
    tenantResource.updateUser(request, user.getIdentifier(), user);
    verify(serviceFacade).updateUser(user);
    verify(eventService).publish(eq(EventFactory.userUpdated(user)));
}